From 1cf757598fe46430f7f7f857f7c9bd9d5bb146d1 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 2 Nov 2021 05:51:25 +0200 Subject: macOS: Tab close buttons on the left Platform convention. --- src/ui/util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/ui/util.c') diff --git a/src/ui/util.c b/src/ui/util.c index 6d0453ff..640b3112 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -1455,12 +1455,17 @@ void addTabCloseButton_Widget(iWidget *tabs, const iWidget *page, const char *co iLabelWidget *tabButton = tabButtonForPage_Widget_(tabs, page); setPadding_Widget(as_Widget(tabButton), 0, 0, 0, gap_UI / 4); setFlags_Widget(as_Widget(tabButton), arrangeVertical_WidgetFlag | resizeHeightOfChildren_WidgetFlag, iTrue); +#if defined (iPlatformApple) + const int64_t edge = moveToParentLeftEdge_WidgetFlag; +#else + const int64_t edge = moveToParentRightEdge_WidgetFlag; +#endif iLabelWidget *close = addChildFlags_Widget( as_Widget(tabButton), iClob(new_LabelWidget(close_Icon, format_CStr("%s id:%s", command, cstr_String(id_Widget(page))))), - moveToParentRightEdge_WidgetFlag | tight_WidgetFlag | frameless_WidgetFlag | - noBackground_WidgetFlag | hidden_WidgetFlag | visibleOnParentHover_WidgetFlag); + edge | tight_WidgetFlag | frameless_WidgetFlag | noBackground_WidgetFlag | + hidden_WidgetFlag | visibleOnParentHover_WidgetFlag); if (deviceType_App() != desktop_AppDeviceType) { setFlags_Widget(as_Widget(close), hidden_WidgetFlag | visibleOnParentHover_WidgetFlag, iFalse); -- cgit v1.2.3