Changeset 8edec53 in mainline for uspace/app
- Timestamp:
- 2021-10-25T17:51:10Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 91ece11b
- Parents:
- 805a149
- Location:
- uspace/app
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nav/nav.c
r805a149 r8edec53 130 130 ui_wnd_params_t params; 131 131 gfx_rect_t rect; 132 gfx_rect_t arect; 133 gfx_coord_t pw; 132 134 unsigned i; 133 135 errno_t rc; … … 155 157 156 158 ui_window_set_cb(navigator->window, &window_cb, (void *) navigator); 159 ui_window_get_app_rect(navigator->window, &arect); 157 160 158 161 rc = ui_fixed_create(&navigator->fixed); … … 176 179 return rc; 177 180 } 181 182 /* Panel width */ 183 pw = (arect.p1.x - arect.p0.x) / 2; 178 184 179 185 for (i = 0; i < 2; i++) { … … 183 189 goto error; 184 190 185 rect.p0.x = 40* i;186 rect.p0.y = 1;187 rect.p1.x = 40* (i + 1);188 rect.p1.y = 24;191 rect.p0.x = arect.p0.x + pw * i; 192 rect.p0.y = arect.p0.y + 1; 193 rect.p1.x = arect.p0.x + pw * (i + 1); 194 rect.p1.y = arect.p1.y - 1; 189 195 panel_set_rect(navigator->panel[i], &rect); 190 196 -
uspace/app/nav/panel.c
r805a149 r8edec53 351 351 panel_activate_req(panel); 352 352 353 i f (event->type == POS_PRESS) {354 irect.p0.x = panel->rect.p0.x+ 1;355 irect.p0.y = panel->rect.p0.y +1;356 irect.p1.x = panel->rect.p1.x- 1;357 irect.p1.y = panel->rect.p1.y - 1; 358 353 irect.p0.x = panel->rect.p0.x + 1; 354 irect.p0.y = panel->rect.p0.y + 1; 355 irect.p1.x = panel->rect.p1.x - 1; 356 irect.p1.y = panel->rect.p1.y - 1; 357 358 if (event->type == POS_PRESS || event->type == POS_DCLICK) { 359 359 /* Did we click on one of the entries? */ 360 360 if (gfx_pix_inside_rect(&pos, &irect)) { … … 365 365 entry = panel_page_nth_entry(panel, n, &entry_idx); 366 366 367 /* Move to the entry found */ 368 panel_cursor_move(panel, entry, entry_idx); 367 if (event->type == POS_PRESS) { 368 /* Move to the entry found */ 369 panel_cursor_move(panel, entry, entry_idx); 370 } else { 371 /* event->type == POS_DCLICK */ 372 panel_open(panel, entry); 373 } 369 374 } else { 370 /* It's in the border. Top or bottom half? */ 371 if (pos.y >= (irect.p0.y + irect.p1.y) / 2) 372 panel_page_down(panel); 373 else 374 panel_page_up(panel); 375 /* It's in the border. */ 376 if (event->type == POS_PRESS) { 377 /* Top or bottom half? */ 378 if (pos.y >= (irect.p0.y + irect.p1.y) / 2) 379 panel_page_down(panel); 380 else 381 panel_page_up(panel); 382 } 375 383 } 376 384 } -
uspace/app/nav/panel.h
r805a149 r8edec53 83 83 extern void panel_activate_req(panel_t *); 84 84 85 86 85 #endif 87 86 -
uspace/app/terminal/terminal.c
r805a149 r8edec53 842 842 sysarg_t sy = -term->off.y; 843 843 844 if (event->type == POS_PRESS || event->type == POS_RELEASE) { 844 if (event->type == POS_PRESS || event->type == POS_RELEASE || 845 event->type == POS_DCLICK) { 845 846 cevent.type = CEV_POS; 846 847 cevent.ev.pos.type = event->type;
Note:
See TracChangeset
for help on using the changeset viewer.