=> d74e1dc35d108d1f17342ff203838b83d135537e
[1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 89f71697..71f53af4 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -400,8 +400,6 @@[m [mstatic iBool handleRootCommands_(iWidget *root, const char *cmd) {[m iSidebarWidget *sidebar = findChild_Widget(root, "sidebar");[m iSidebarWidget *sidebar2 = findChild_Widget(root, "sidebar2");[m removeChild_Widget(parent_Widget(sidebar), sidebar);[m [31m- setButtonFont_SidebarWidget(sidebar, isLandscape_App() ? uiLabel_FontId : defaultBig_FontId);[m [31m- setButtonFont_SidebarWidget(sidebar2, isLandscape_App() ? uiLabel_FontId : defaultBig_FontId);[m // setBackgroundColor_Widget(findChild_Widget(as_Widget(sidebar), "buttons"),[m // isPortrait_App() ? uiBackgroundUnfocusedSelection_ColorId[m // : uiBackgroundSidebar_ColorId);[m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex eb129424..fe33c540 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -100,7 +100,7 @@[m [mstruct Impl_SidebarWidget {[m int modeScroll[max_SidebarMode];[m iLabelWidget * modeButtons[max_SidebarMode];[m int maxButtonLabelWidth;[m [31m- int widthAsGaps;[m [32m+[m[32m float widthAsGaps;[m int buttonFont;[m int itemFonts[2];[m size_t numUnreadEntries;[m [36m@@ -143,7 +143,9 @@[m [mstatic iLabelWidget *addActionButton_SidebarWidget_(iSidebarWidget *d, const cha[m //(deviceType_App() != desktop_AppDeviceType ?[m // extraPadding_WidgetFlag : 0) |[m flags);[m [31m- setFont_LabelWidget(btn, d->buttonFont);[m [32m+[m[32m setFont_LabelWidget(btn, deviceType_App() == phone_AppDeviceType && d->side == right_SidebarSide[m [32m+[m[32m ? defaultBig_FontId[m [32m+[m[32m : d->buttonFont);[m checkIcon_LabelWidget(btn);[m return btn;[m }[m [36m@@ -641,7 +643,7 @@[m [mvoid init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) {[m d->mode = -1;[m d->feedsMode = all_FeedsMode;[m d->numUnreadEntries = 0;[m [31m- d->buttonFont = uiLabel_FontId;[m [32m+[m[32m d->buttonFont = uiLabel_FontId; /* wiil be changed later */[m d->itemFonts[0] = uiContent_FontId;[m d->itemFonts[1] = uiContentBold_FontId;[m #if defined (iPlatformMobile)[m [36m@@ -649,9 +651,9 @@[m [mvoid init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) {[m d->itemFonts[0] = defaultBig_FontId;[m d->itemFonts[1] = defaultBigBold_FontId;[m }[m [31m- d->widthAsGaps = 73;[m [32m+[m[32m d->widthAsGaps = 73.0f;[m #else[m [31m- d->widthAsGaps = 60;[m [32m+[m[32m d->widthAsGaps = 60.0f;[m #endif[m setFlags_Widget(w, fixedWidth_WidgetFlag, iTrue);[m iWidget *vdiv = makeVDiv_Widget();[m [36m@@ -745,14 +747,18 @@[m [mvoid deinit_SidebarWidget(iSidebarWidget *d) {[m deinit_String(&d->cmdPrefix);[m }[m [m [31m-void setButtonFont_SidebarWidget(iSidebarWidget *d, int font) {[m [31m- d->buttonFont = font;[m [31m- for (int i = 0; i < max_SidebarMode; i++) {[m [31m- if (d->modeButtons[i]) {[m [31m- setFont_LabelWidget(d->modeButtons[i], font);[m [32m+[m[32miBool setButtonFont_SidebarWidget(iSidebarWidget *d, int font) {[m [32m+[m[32m if (d->buttonFont != font) {[m [32m+[m[32m d->buttonFont = font;[m [32m+[m[32m for (int i = 0; i < max_SidebarMode; i++) {[m [32m+[m[32m if (d->modeButtons[i]) {[m [32m+[m[32m setFont_LabelWidget(d->modeButtons[i], font);[m [32m+[m[32m }[m }[m [32m+[m[32m updateMetrics_SidebarWidget_(d);[m [32m+[m[32m return iTrue;[m }[m [31m- updateMetrics_SidebarWidget_(d);[m [32m+[m[32m return iFalse;[m }[m [m static const iGmIdentity *constHoverIdentity_SidebarWidget_(const iSidebarWidget *d) {[m [36m@@ -827,8 +833,10 @@[m [mstatic void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) {[m if (d->itemFonts[0] != fonts[0]) {[m d->itemFonts[0] = fonts[0];[m d->itemFonts[1] = fonts[1];[m [31m- updateMetrics_SidebarWidget_(d);[m [32m+[m[32m// updateMetrics_SidebarWidget_(d);[m [32m+[m[32m updateItemHeight_SidebarWidget_(d);[m }[m [32m+[m[32m setButtonFont_SidebarWidget(d, isPortrait_App() ? defaultBig_FontId : uiLabel_FontId);[m }[m const iBool isTight =[m (width_Rect(bounds_Widget(as_Widget(d->modeButtons[0]))) < d->maxButtonLabelWidth);[m [36m@@ -858,7 +866,7 @@[m [mstatic void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) {[m void setWidth_SidebarWidget(iSidebarWidget *d, float widthAsGaps) {[m iWidget *w = as_Widget(d);[m const iBool isFixedWidth = deviceType_App() == phone_AppDeviceType;[m [31m- int width = widthAsGaps * gap_UI;[m [32m+[m[32m int width = widthAsGaps * gap_UI; /* in pixels */[m if (!isFixedWidth) {[m /* Even less space if the other sidebar is visible, too. */[m const int otherWidth =[m [36m@@ -866,9 +874,7 @@[m [mvoid setWidth_SidebarWidget(iSidebarWidget *d, float widthAsGaps) {[m width = iClamp(width, 30 * gap_UI, size_Root(w->root).x - 50 * gap_UI - otherWidth);[m }[m d->widthAsGaps = (float) width / (float) gap_UI;[m [31m- if (isVisible_Widget(w)) {[m [31m- w->rect.size.x = width;[m [31m- }[m [32m+[m[32m w->rect.size.x = width;[m arrange_Widget(findWidget_Root("stack"));[m checkModeButtonLayout_SidebarWidget_(d);[m updateItemHeight_SidebarWidget_(d);[m [36m@@ -935,6 +941,7 @@[m [mstatic iBool handleSidebarCommand_SidebarWidget_(iSidebarWidget *d, const char *[m if (wasChanged) {[m postCommandf_App("%s.mode.changed arg:%d", cstr_String(id_Widget(w)), d->mode);[m }[m [32m+[m[32m refresh_Widget(findChild_Widget(w, "buttons"));[m return iTrue;[m }[m else if (equal_Command(cmd, "toggle")) {[m [36m@@ -1556,7 +1563,7 @@[m [mstatic void draw_SidebarWidget_(const iSidebarWidget *d) {[m const iRect bounds = bounds_Widget(w);[m iPaint p;[m init_Paint(&p);[m [31m- if (deviceType_App() != phone_AppDeviceType) {[m [32m+[m[32m if (!isPortraitPhone_App()) { /* this would erase page contents during transition on the phone */[m if (flags_Widget(w) & visualOffset_WidgetFlag &&[m flags_Widget(w) & horizontalOffset_WidgetFlag && isVisible_Widget(w)) {[m fillRect_Paint(&p, boundsWithoutVisualOffset_Widget(w), tmBackground_ColorId);[m [1mdiff --git a/src/ui/sidebarwidget.h b/src/ui/sidebarwidget.h[m [1mindex 130242ab..2894a951 100644[m [1m--- a/src/ui/sidebarwidget.h[m [1m+++ b/src/ui/sidebarwidget.h[m [36m@@ -49,7 +49,7 @@[m [miDeclareWidgetClass(SidebarWidget)[m iDeclareObjectConstructionArgs(SidebarWidget, enum iSidebarSide side)[m [m iBool setMode_SidebarWidget (iSidebarWidget *, enum iSidebarMode mode);[m [31m-void setButtonFont_SidebarWidget (iSidebarWidget *, int font);[m [32m+[m[32miBool setButtonFont_SidebarWidget (iSidebarWidget *, int font);[m [m enum iSidebarMode mode_SidebarWidget (const iSidebarWidget *);[m float width_SidebarWidget (const iSidebarWidget *);[m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).