diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-14 15:09:54 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-14 15:09:54 +0300 |
commit | 21b16be87fec3ec163fb52b94619ba5f3b5df6d2 (patch) | |
tree | 73df8c1469f9d7f4186b40ea7b8d34c5b6dfd7bf /src/ui/sidebarwidget.c | |
parent | 7f737f1b88448a8a2ccca716a09e3b37fb0c08f9 (diff) |
Mobile and iOS: Various fixes and cleanup
Several regressions occurred when the split view mode was implemented.
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r-- | src/ui/sidebarwidget.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 1eddd6b7..2c7ee75f 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -555,6 +555,7 @@ static void updateMetrics_SidebarWidget_(iSidebarWidget *d) { | |||
555 | .x); | 555 | .x); |
556 | } | 556 | } |
557 | } | 557 | } |
558 | printf("maxButtonLabelWidth: %d\n", d->maxButtonLabelWidth); | ||
558 | updateItemHeight_SidebarWidget_(d); | 559 | updateItemHeight_SidebarWidget_(d); |
559 | } | 560 | } |
560 | 561 | ||
@@ -578,11 +579,11 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) { | |||
578 | d->itemFonts[0] = uiContent_FontId; | 579 | d->itemFonts[0] = uiContent_FontId; |
579 | d->itemFonts[1] = uiContentBold_FontId; | 580 | d->itemFonts[1] = uiContentBold_FontId; |
580 | #if defined (iPlatformAppleMobile) | 581 | #if defined (iPlatformAppleMobile) |
581 | d->widthAsGaps = 73; | ||
582 | if (deviceType_App() == phone_AppDeviceType) { | 582 | if (deviceType_App() == phone_AppDeviceType) { |
583 | d->itemFonts[0] = defaultBig_FontId; | 583 | d->itemFonts[0] = defaultBig_FontId; |
584 | d->itemFonts[1] = defaultBigBold_FontId; | 584 | d->itemFonts[1] = defaultBigBold_FontId; |
585 | } | 585 | } |
586 | d->widthAsGaps = 73; | ||
586 | #else | 587 | #else |
587 | d->widthAsGaps = 60; | 588 | d->widthAsGaps = 60; |
588 | #endif | 589 | #endif |
@@ -806,7 +807,7 @@ void setWidth_SidebarWidget(iSidebarWidget *d, float widthAsGaps) { | |||
806 | if (isVisible_Widget(w)) { | 807 | if (isVisible_Widget(w)) { |
807 | w->rect.size.x = width; | 808 | w->rect.size.x = width; |
808 | } | 809 | } |
809 | arrange_Widget(findWidget_App("stack")); | 810 | arrange_Widget(findWidget_Root("stack")); |
810 | checkModeButtonLayout_SidebarWidget_(d); | 811 | checkModeButtonLayout_SidebarWidget_(d); |
811 | updateItemHeight_SidebarWidget_(d); | 812 | updateItemHeight_SidebarWidget_(d); |
812 | if (!isFixedWidth && !isRefreshPending_App()) { | 813 | if (!isFixedWidth && !isRefreshPending_App()) { |
@@ -1661,7 +1662,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, | |||
1661 | drawRange_Text( | 1662 | drawRange_Text( |
1662 | font, cPos, d->listItem.isSelected ? iconColor : metaFg, range_String(&icon)); | 1663 | font, cPos, d->listItem.isSelected ? iconColor : metaFg, range_String(&icon)); |
1663 | deinit_String(&icon); | 1664 | deinit_String(&icon); |
1664 | drawRange_Text(d->listItem.isSelected ? uiContentBold_FontId : font, | 1665 | drawRange_Text(d->listItem.isSelected ? sidebar->itemFonts[1] : font, |
1665 | add_I2(cPos, init_I2(indent, 0)), | 1666 | add_I2(cPos, init_I2(indent, 0)), |
1666 | fg, | 1667 | fg, |
1667 | range_String(&d->label)); | 1668 | range_String(&d->label)); |