summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-02-21 21:05:13 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-02-21 21:05:13 +0200
commit4175ca0db94fafcf18072187c462e0b61e71016b (patch)
tree89d2c404ea7d3b5e22032f370990bde406f4f058 /src/ui
parentd7a4a193e219032e16bd8480de833dc064b35277 (diff)
iOS: Working on menu styling
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/listwidget.c2
-rw-r--r--src/ui/sidebarwidget.c2
-rw-r--r--src/ui/util.c13
3 files changed, 14 insertions, 3 deletions
diff --git a/src/ui/listwidget.c b/src/ui/listwidget.c
index fe53c595..28a19b9c 100644
--- a/src/ui/listwidget.c
+++ b/src/ui/listwidget.c
@@ -138,7 +138,7 @@ void updateVisible_ListWidget(iListWidget *d) {
138void setItemHeight_ListWidget(iListWidget *d, int itemHeight) { 138void setItemHeight_ListWidget(iListWidget *d, int itemHeight) {
139 d->itemHeight = itemHeight; 139 d->itemHeight = itemHeight;
140 if (deviceType_App() != desktop_AppDeviceType) { 140 if (deviceType_App() != desktop_AppDeviceType) {
141 d->itemHeight += gap_UI; 141 d->itemHeight += 1.5 * gap_UI;
142 } 142 }
143 invalidate_ListWidget(d); 143 invalidate_ListWidget(d);
144} 144}
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index b1dfc378..bbd65268 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -476,8 +476,6 @@ void init_SidebarWidget(iSidebarWidget *d, enum iSidebarSide side) {
476 setFlags_Widget(w, fixedWidth_WidgetFlag, iTrue); 476 setFlags_Widget(w, fixedWidth_WidgetFlag, iTrue);
477 iWidget *vdiv = makeVDiv_Widget(); 477 iWidget *vdiv = makeVDiv_Widget();
478 addChildFlags_Widget(w, vdiv, resizeToParentWidth_WidgetFlag | resizeToParentHeight_WidgetFlag); 478 addChildFlags_Widget(w, vdiv, resizeToParentWidth_WidgetFlag | resizeToParentHeight_WidgetFlag);
479 if (deviceType_App() == phone_AppDeviceType && d->side == left_SideBarSide) {
480 }
481 iZap(d->modeButtons); 479 iZap(d->modeButtons);
482 /* On a phone, the right sidebar is used exclusively for Identities. */ 480 /* On a phone, the right sidebar is used exclusively for Identities. */
483 const iBool isPhone = deviceType_App() == phone_AppDeviceType; 481 const iBool isPhone = deviceType_App() == phone_AppDeviceType;
diff --git a/src/ui/util.c b/src/ui/util.c
index c55b2c36..4f059dc7 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -477,6 +477,19 @@ void openMenu_Widget(iWidget *d, iInt2 coord) {
477 setFlags_Widget(d, hidden_WidgetFlag, iFalse); 477 setFlags_Widget(d, hidden_WidgetFlag, iFalse);
478 setFlags_Widget(d, commandOnMouseMiss_WidgetFlag, iTrue); 478 setFlags_Widget(d, commandOnMouseMiss_WidgetFlag, iTrue);
479 setFlags_Widget(findChild_Widget(d, "menu.cancel"), disabled_WidgetFlag, iFalse); 479 setFlags_Widget(findChild_Widget(d, "menu.cancel"), disabled_WidgetFlag, iFalse);
480 if (deviceType_App() == phone_AppDeviceType) {
481 if (isPortrait_App()) {
482 setFlags_Widget(d, arrangeWidth_WidgetFlag | resizeChildrenToWidestChild_WidgetFlag, iFalse);
483 setFlags_Widget(d, resizeWidthOfChildren_WidgetFlag, iTrue);
484 d->rect.size.x = rootSize_Window(get_Window()).x;
485 iForEach(ObjectList, i, children_Widget(d)) {
486 if (isInstance_Object(i.object, &Class_LabelWidget)) {
487 iLabelWidget *label = i.object;
488 setFont_LabelWidget(label, defaultBig_FontId);
489 }
490 }
491 }
492 }
480 arrange_Widget(d); 493 arrange_Widget(d);
481 d->rect.pos = coord; 494 d->rect.pos = coord;
482 /* Ensure the full menu is visible. */ 495 /* Ensure the full menu is visible. */