View previous topic :: View next topic |
Author |
Message |
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 290
|
Posted: Sun Dec 15, 2024 4:50 pm Post subject: Purpose of GTK use flag for dev-qt/qtbase and qtwidgets |
|
|
Today I noticed that the packages dev-qt/qtbase and dev-qt/qtwidgets also support the GTK use flag. What is the purpose of that use flag? What do I gain or loose if I enable/disable the use flag? (Currently it is disabled.)
I am on a "pure" Qt/Plasma/KDE system and KDE is the only desktop environment in use. Hence, "gtk" is disabled on a global level. However, I also run some GTK applications, e.g. GIMP and Firefox. I have selectively enabled the GTK use flag for kde-plasma/plasma-meta and kde-plasma/print-manager to enable the Plasma Breeze theme for GTK applications and have the KDE print dialog in GTK applications.
Does the GTK use flag for dev-qt/qtbase and dev-qt/qtwidgets serve a similar purpose? If yes, what do I gain, if enabled? |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 443
|
Posted: Sun Dec 15, 2024 5:34 pm Post subject: |
|
|
You cannot "loose" anything but you may "lose" something.
Quote: | I am on a "pure" Qt/Plasma/KDE system and KDE is the only desktop environment in use. Hence, "gtk" is disabled on a global level. |
That is flawed logic. There are other factors to consider when disabling a use flag globally, especially when you do not even know what that use flag does for your particular set of installed packages. That is evident in the fact that you are asking what the gtk use flag does for two particular packages installed on your system.
If you are going to disable a use flag globally, possibly overriding your default profile, at least do the research and find out if that is in your best interests. Then, make an informed decision, not a haphazard guess.
In this particular case, one thing you would may want to refer to is:
https://packages.gentoo.org/useflags/gtk
Both of those packages you refer to have the gtk use flag to "Build the GTK platform theme plugin". My assumption from looking at the source code is that it is simply used for theming purposes. Using KDE Plasma, I would assume, maybe incorrectly, that will affect System Settings>Colors and Themes>Application Style. Click on the 3 dots in the top right corner next to Configure Icons and Toolbars and you will see a popup option for "Configure Gnome/GTK application style."
Another thing to consider is whether or not a use flag is enabled on your system due to your default profile. Remove any reference to gtk in make.conf (USE=gtk or USE=-gtk). Run 'emerge --info' or 'emerge --info | grep gtk' (to highlight the word gtk in the results). If it shows up in the output (USE=gtk) and you did not explicitly enable or disable it, then it is likely enabled by the profile. Unless you have specific, informed reasons to globally disable use flags enabled by your profile, you should generally just leave it enabled. |
|
Back to top |
|
|
nagmat84 Apprentice
Joined: 27 Mar 2007 Posts: 290
|
Posted: Sun Dec 15, 2024 7:03 pm Post subject: |
|
|
Quote: | That is evident in the fact that you are asking what the gtk use flag does for two particular packages installed on your system. | Unfortunately, the in-depth meaning of a use flag for a particular is usually not well documented. That is not meant to offense anybody. It is just an observation. I myself know that documentation is very often an unloved task and as we are all volunteers. Hence, nobody has the obligation to write documentation.
Quote: | If you are going to disable a use flag globally, possibly overriding your default profile, at least do the research and find out if that is in your best interests. Then, make an informed decision, not a haphazard guess. | I did. I usually even go to the upstream site (in this case Qt) to find something in their build documentation, because usually use flags correspond to a flag for the configuration script of the build system. But in this case nothing useful popped up.
The Gentoo Wiki: KDE - Use flags as describes the meaning of the GTK use flag at least for "kde-plasma/plasma-meta". So yes, I did my research.
Quote: | Using KDE Plasma, I would assume, maybe incorrectly, that will affect System Settings>Colors and Themes>Application Style. Click on the 3 dots in the top right corner next to Configure Icons and Toolbars and you will see a popup option for "Configure Gnome/GTK application style." | Well, you are indeed incorrect here. The only use flag which is needed for that is the GTK use flag on "kde-plasma/plasma-meta" which then pulls in "kde-plasma/breeze-gtk" and "de-plasma/kde-gtk-config". The GTK use flag for dev-qt/qtbase and dev-qt/qtwidgets is not needed for that. So you are guessing yourself here. Hence, my question doesn't seem to be so dumb at all.
This doesn't explain what the use flag does for each package. That only shows which package use that use flag.
Quote: | Another thing to consider is whether or not a use flag is enabled on your system due to your default profile. Remove any reference to gtk in make.conf (USE=gtk or USE=-gtk). Run 'emerge --info' or 'emerge --info | grep gtk' (to highlight the word gtk in the results). If it shows up in the output (USE=gtk) and you did not explicitly enable or disable it, then it is likely enabled by the profile. | Well, there are other options to find out whether the profile enables the use flag ( for example using ufed). However, this doesn't answer the question either. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3458 Location: Canada
|
Posted: Sun Dec 15, 2024 7:51 pm Post subject: |
|
|
nagmat84 wrote: | Quote: | That is evident in the fact that you are asking what the gtk use flag does for two particular packages installed on your system. | Unfortunately, the in-depth meaning of a use flag for a particular is usually not well documented. |
Indeed, this is my experience as well. Exact meaning of the use flag is more often than not cannot be deduced from the description or some easy to find documentation and leaves a lot to guessing. I also run global "-gtk' ( perhaps from older naive idea that sometimes I could run purely qt desktop) and enable it only when forced to for particular packages. Which currently has just three cases kept in /etc/portage/packages.use/use_gtk
Code: |
kde-plasma/plasma-meta gtk
app-crypt/gcr gtk
dev-libs/libdbusmenu gtk3
|
Of course I have also some packages that use gtk unconditionally.
Interesting that Qt5 did not have gtk use flag |
|
Back to top |
|
|
asturm Developer
Joined: 05 Apr 2007 Posts: 9320
|
Posted: Sun Dec 15, 2024 7:52 pm Post subject: |
|
|
dmpogo wrote: | Interesting that Qt5 did not have gtk use flag |
But dev-qt/qtwidgets cited here is Qt5-only, and if you compare description of its GTK flag with qtbase's (Qt6), they are identical.
Last edited by asturm on Mon Dec 16, 2024 6:47 am; edited 1 time in total |
|
Back to top |
|
|
rab0171610 Guru
Joined: 24 Dec 2022 Posts: 443
|
Posted: Sun Dec 15, 2024 7:56 pm Post subject: |
|
|
I think if you are not using QT Creator and needing to theme widgets or apps with styles for use in other environments
or plan to use gtk style then you likely do not need gtk support for those packages. But again, that is just guessing, maybe incorrectly.
What I mean to say is that QT, in addition to gtk, also provides for these additional styles:
"style-fusion style-mac style-windows style-windowsvista or style-android" |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2884
|
Posted: Mon Dec 16, 2024 7:38 am Post subject: |
|
|
In case gtk wasn't enough for you, >=dev-qt/qtwayland-6.8 now has a USE=gnome too (intended for gnome integration on wayland and only enabled by default on gnome profiles).
That aside, USE=gtk on qtbase is very cheap (aka not worth a package.use entry to override desktop profiles' default gtk regardless of if you need it or not, it's small). Most desktop will need its dependencies anyway, so it won't pull anything extra unless you're trying to eliminate gtk+-3 from your system (this plugin hasn't moved to gtk4 yet).
...albeit odds are that you're not using it if you don't know and also not using a GTK-based DE like gnome that may automatically use it to make QT applications pull their colors from the current gtk3 theme so they somewhat match with the rest of the DE.
Edit: note that USE=gtk has the opposite meaning on e.g. plasma-meta, it's to integrate gtk applications on plasma, so I wouldn't disable it unless you really are not using any gtk applications, or if doesn't matter to you if they don't fit in... but again, these things are hardly worth worrying about. |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3458 Location: Canada
|
Posted: Mon Dec 16, 2024 10:41 pm Post subject: |
|
|
asturm wrote: | dmpogo wrote: | Interesting that Qt5 did not have gtk use flag |
But dev-qt/qtwidgets cited here is Qt5-only, and if you compare description of its GTK flag with qtbase's (Qt6), they are identical. |
Indeed, I missed qtwidgets !. Need to check the eyesight. So that is what was folded into qtbase with gtk flag |
|
Back to top |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3458 Location: Canada
|
Posted: Mon Dec 16, 2024 10:44 pm Post subject: |
|
|
Ionen wrote: |
That aside, USE=gtk on qtbase is very cheap (aka not worth a package.use entry to override desktop profiles' default gtk regardless of if you need it or not, it's small). Most desktop will need its dependencies anyway, so it won't pull anything extra unless you're trying to eliminate gtk+-3 from your system (this plugin hasn't moved to gtk4 yet).
|
I was hoping to eliminate gtk2 from my desktop since like 10 years ago and still did not succeed |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5240 Location: Bavaria
|
Posted: Tue Dec 17, 2024 2:21 am Post subject: |
|
|
Ionen wrote: | Edit: note that USE=gtk has the opposite meaning on e.g. plasma-meta, it's to integrate gtk applications on plasma, so I wouldn't disable it unless you really are not using any gtk applications, or if doesn't matter to you if they don't fit in... but again, these things are hardly worth worrying about. |
I want add that after enabling "gtk" globally (which is the default with a plasma- or gnome-profile) somebody might to disable it for the package "pinentry" (coming from @system -> virtual/package-manager -> portage -> gnupg -> pinentry) if there is no interest in "gnome-keyring". _________________ https://wiki.gentoo.org/wiki/User:Pietinger |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|