With gtk3 I can easily place the icon before the text by using a horizontal orientation. This is ignored for kf5/6, gen, and likely other VCL too, and the icon always goes in a vertical orientation. Test with https://gerrit.libreoffice.org/c/core/+/168685 or change the respective attribute for cui/uiconfig/ui/hyperlinkdialog.ui.
(In reply to Heiko Tietze from comment #0) > Test with https://gerrit.libreoffice.org/c/core/+/168685 or change the > respective attribute for cui/uiconfig/ui/hyperlinkdialog.ui. Do I understand correctly that this is something that is/can be set independently for the GtkBox of each single tab child, i.e. the tab control itself doesn't actually handle it, but it just gets a GtkWidget child? Using `WB_SMALLICON` for the `SvtIconChoiceCtrl` seems to give a similar result to the gtk3 version, but is not configurable per tab child. Sample change to test that: diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx index 4566ad1310b9..be5e4c774796 100644 --- a/vcl/source/control/ivctrl.cxx +++ b/vcl/source/control/ivctrl.cxx @@ -368,7 +368,7 @@ struct VerticalTabPageData VerticalTabControl::VerticalTabControl(vcl::Window* pParent, bool bWithIcons) : VclHBox(pParent) - , m_xChooser(VclPtr<SvtIconChoiceCtrl>::Create(this, WB_3DLOOK | (bWithIcons ? WB_ICON : WB_DETAILS) | WB_BORDER | + , m_xChooser(VclPtr<SvtIconChoiceCtrl>::Create(this, WB_3DLOOK | (bWithIcons ? WB_SMALLICON : WB_DETAILS) | WB_BORDER | WB_NOCOLUMNHEADER | WB_NODRAGSELECTION | WB_TABSTOP | WB_CLIPCHILDREN | WB_NOHSCROLL)) If it were an attribute of the GtkNotebook, switching mode based on that attribute could be an option, but if it's not, I don't see a simple way to make it work in a way that's configurable independently for each single tab child.
(In reply to Michael Weghorn from comment #1) > If it were an attribute of the GtkNotebook, switching mode based on that > attribute could be an option, but if it's not, I don't see a simple way to > make it work in a way that's configurable independently for each single tab > child. Apparently this is set via the "tab-pos" property of the "GtkNotebook", defining the position of all child tabs. See f.i. the file paradialog.ui in Heiko's patch.
(In reply to Rafael Lima from comment #2) > Apparently this is set via the "tab-pos" property of the "GtkNotebook", > defining the position of all child tabs. > > See f.i. the file paradialog.ui in Heiko's patch. As far as I understand, "tab-pos" defines whether the whole tab bar is on the top or on the left, not the position of the icons within the single tab items. (Changing it to "top" moves the tab bar to the top of the dialog, but leaves the icons left of the text in the individual tab items.) The GtkNotebook doc [1] also mentions that `tab_label` is a GtkWidget, not just a string/char*, which allows for much more flexibility for each single item. [1] https://docs.gtk.org/gtk3/method.Notebook.append_page.html
Created attachment 200100 [details] Vertical tabs with icons If a dialog contains many VT we cannot place the icon above the label. Using the same method (GtkBox with label and image inside the tab grid) but now with horizontal orientation ends up in this mess. Keep also an eye on the hover feedback: "text grid" is selected and the mouse cursor hovers over page. It works well with gtk3 and kf6, okayish for gen, not at all for win and macOS.
Created attachment 201180 [details] Snapshot on macOS with https://gerrit.libreoffice.org/c/core/+/186191 patch
Heiko Tietze committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b787dfcc08af0ae1358c69fe4fcbd50af4f444d5 Resolves tdf#163008 - Vertical tabs with small icons It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 201181 [details] Rough patch that uses buttons instead of tabs for vertical tabs on macOS
Created attachment 201182 [details] Snapshot of macOS with rough patch in attachment.cgi #201181
Created attachment 201184 [details] Rough patch 2 that looks more like the macOS System Settings application
(In reply to Patrick (volunteer) from comment #7) > Created attachment 201181 [details] > Rough patch that uses buttons instead of tabs for vertical tabs on macOS It definitely becomes more mac'ish but what I dislike is the low button. It needs at least 2px margin from the 28px (IIRC) icons which makes it 32px as defined in c'tor: Size gridSize(140, (nWinStyle & WB_SMALLICON) ? 32 : 70); All other OS/DE respect this but macOS just adds white space around the TabItem or PushButton.
Created attachment 201186 [details] Snapshot of macOS with rough patch 2 in attachment #201184 [details]
(In reply to Heiko Tietze from comment #10) > All other OS/DE respect this but macOS just adds white space around the > TabItem or PushButton. Found a way to increase the height of a native push button by setting its bezel type to NSBezelStyleFlexiblePush. Not sure how to wire up setting that bezel style though: diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index dd89133353bb..fcdaa10856bc 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -561,7 +561,8 @@ bool AquaGraphicsBackendBase::performDrawNativeControl(ControlType nType, case ControlType::Pushbutton: { NSControlSize eSizeKind = NSControlSizeRegular; - NSBezelStyle eBezelStyle = NSBezelStyleRounded; + // NSBezelStyle eBezelStyle = NSBezelStyleRounded; + NSBezelStyle eBezelStyle = NSBezelStyleFlexiblePush; PushButtonValue const *pPBVal = aValue.getType() == ControlType::Pushbutton ? static_cast<PushButtonValue const *>(&aValue) : nullptr; @@ -574,7 +575,7 @@ bool AquaGraphicsBackendBase::performDrawNativeControl(ControlType nType, } else if ((pPBVal && pPBVal->mbSingleLine) || rc.size.height < PUSH_BUTTON_NORMAL_HEIGHT * 3 / 2) { - GetThemeMetric(kThemeMetricPushButtonHeight, &nPaintHeight); + // GetThemeMetric(kThemeMetricPushButtonHeight, &nPaintHeight); } else {
(In reply to Patrick (volunteer) from comment #12) > Found a way to increase the height of a native push button... Sounds promising. A bit weird to implement this in order to make VT work, but... comments are patient. Mind to push a patch?
(In reply to Heiko Tietze from comment #13) > Sounds promising. A bit weird to implement this in order to make VT work, > but... comments are patient. Mind to push a patch? I have uploaded the following patch. Still needs some "fit and finish" work though: https://gerrit.libreoffice.org/c/core/+/186340
Created attachment 201190 [details] Snapshot of vertical tabs on macOS with https://gerrit.libreoffice.org/c/core/+/186340 patch
Created attachment 201191 [details] Snapshot in macOS Light Mode
Created attachment 201192 [details] Snapshot in macOS Dark Mode
Patrick Luby committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b9a390c5add74147bf8ed1b9b3658e7a36c20a66 Related: tdf#163008 draw the selected tab using a push button on macOS It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I have committed a patch makes vertical tabs on macOS look and behave closer to the current (macOS Sequoia) vertical tabs in Apple's System Settings application. My latest commit should be in tomorrow's (12 June 2025) nightly master builds: https://dev-builds.libreoffice.org/daily/master/current.html Note for macOS testers: the nightly master build installer does *not* overwrite any LibreOffice official versions. Instead, it will be installed as a separate application called "LibreOfficeDev" in the /Applications folder. Because this is a "test" build, you will need to do the following steps before you launch the LibreOfficeDev application: 1. Go to the Finder and navigate to the /Applications/Utilities folder 2. Launch the "Terminal" application 3. Paste the following command in the Terminal application window and press the Return key to execute the command: xattr -d com.apple.quarantine /Applications/LibreOfficeDev.app
Heiko Tietze committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/f14064478726b8b35d45654d0162616bf01959ba Resolves tdf#163008 - Vertical tabs with small icons It will be available in 25.8.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Patrick Luby committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/6d4512517a31baf44fe38df7ed66414684b71088 Related: tdf#163008 draw the selected tab using a push button on macOS It will be available in 25.8.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/01c02f3e3affec317bf5eb2de087dbe3dc556cc1 Revert "Related: tdf#163008 draw the selected tab using a push button on macOS" It will be available in 25.8.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/3486101e4996fed94cd3153b7fe7b5fe4b6006ee Revert "Resolves tdf#163008 - Vertical tabs with small icons" It will be available in 25.8.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.