qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

Allow to select Qt's default style

Open sledgehammer999 opened this issue 1 year ago • 12 comments

Relevant prior PR #21553

Fusion is still the default. Here is how it looks on a default profile: Untitled

sledgehammer999 avatar Oct 13 '24 17:10 sledgehammer999

How is "system" different from the other styles?

Pentaphon avatar Oct 13 '24 20:10 Pentaphon

How is "system" different from the other styles?

The tooltip says it: "Let Qt decide the QStyle for this system" -> Aka whatever Qt decides as default, which will be one of the other named styles.

sledgehammer999 avatar Oct 13 '24 20:10 sledgehammer999

The tooltip says it: "Let Qt decide the QStyle for this system" -> Aka whatever Qt decides as default, which will be one of the other named styles.

Ok so assuming each of the combobox options gets a tooltip explaining what each style can do, what else is left to do for this PR?

Pentaphon avatar Oct 13 '24 21:10 Pentaphon

Ok so assuming each of the combobox options gets a tooltip explaining what each style can do

No. Only the "system" one, because it is a special value inserted by us. The other styles come from a dynamic list offered by Qt. Qt doesn't guarantee neither the name of the styles nor what each does. But unofficially the style names seem to be stable for several years now.

what else is left to do for this PR?

From my end, nothing. I wait review.

sledgehammer999 avatar Oct 13 '24 21:10 sledgehammer999

Are so many changes of optionsdialog.ui really required?

To be honest this is Qt Designer's fault. I only added the label and tweaked a few settings on that label. I left the other things unchanged but Qt Designer decides to rearranged things when saving. If you want, I can try to interactively add only the relevant changes with git add -p optionsdialog.ui

sledgehammer999 avatar Oct 14 '24 14:10 sledgehammer999

I only added the label and tweaked a few settings on that label. I left the other things unchanged but Qt Designer decides to rearranged things when saving.

We usually insist that only relevant changes are added in .ui files, manually or in some other way that avoids unnecessary changes.

glassez avatar Oct 14 '24 15:10 glassez

  • I added the separator and updated the pic in the first post
  • I am not sure how to indent the split line. I am using VSCode now and I don't have QtCreator's automatic indentation of split lines.
  • I am not sure how to further filter the changes in optionsdialog.ui without potentially breaking it.

sledgehammer999 avatar Oct 14 '24 23:10 sledgehammer999

  • I am not sure how to further filter the changes in optionsdialog.ui without potentially breaking it.

Dealing with such changes are really messy. But UI file is just XML. It's not so hard to edit it manually. If I need to add some kind of control to some widget, I usually do the following. I add it in the Designer, then I find a portion of the XML code related to it, copy it, reset the changes in .ui and paste copied code manually (perhaps also adjusting the properties of adjacent elements, for example, row/column numbers). Yes, it is more difficult than just using a Designer, but it produces a readable "diff" and our history does not contain these useless/confusing changes.

glassez avatar Oct 15 '24 11:10 glassez

  • I am not sure how to further filter the changes in optionsdialog.ui without potentially breaking it.

Dealing with such changes are really messy. But UI file is just XML. It's not so hard to edit it manually. If I need to add some kind of control to some widget, I usually do the following. I add it in the Designer, then I find a portion of the XML code related to it, copy it, reset the changes in .ui and paste copied code manually (perhaps also adjusting the properties of adjacent elements, for example, row/column numbers). Yes, it is more difficult than just using a Designer, but it produces a readable "diff" and our history does not contain these useless/confusing changes.

I believe all you need is to replace the following fragment (of original optionsdialog.ui):

<item row="2" column="2">
 <spacer name="spacerStyle">
  <property name="orientation">
   <enum>Qt::Orientation::Horizontal</enum>
  </property>
  <property name="sizeHint" stdset="0">
   <size>
    <width>40</width>
    <height>20</height>
   </size>
  </property>
 </spacer>
</item>

...with the following:

<item row="2" column="2">
 <widget class="QLabel" name="labelStyleHint"/>
</item>

glassez avatar Oct 15 '24 12:10 glassez

Соответствующий предыдущий PR # 21553

Fusion по-прежнему используется по умолчанию. Вот как он выглядит в профиле по умолчанию: Без названия

Hello. In my opinion, theme names should be clear. The name "Windows" is not suitable, since "qBittorrent" exists not only for the Windows OS.

Theme names that are suitable for all OS: "Light" - white theme "Dark" - black theme "System" - fusion theme or "Sync (theme color with computer OS)" or "Fusion (theme color with computer OS)"

P.S. In my opinion, by default, the "Light" theme should be enabled (as in Windows OS). Windows OS has a million-strong audience, they are according to user, they chose the best default color.

As a last resort, the choice of theme color can be added during installation, here: 373903255-490fbd75-1b68-468e-a8f5-18fb801b6017

_Please try to make the colors of the dark theme and light theme pleasing to the eye, as well as their icons and everything else. So that qBittorrent looks like a modern application.

Examples of dark and light theme color shades_ https://github.com/qbittorrent/qBittorrent/issues/21521

oopwow avatar Oct 16 '24 16:10 oopwow

@oopwow This topic isn't about color schemes.

glassez avatar Oct 16 '24 16:10 glassez

@oopwow

The name "Windows" is not suitable, since "qBittorrent" exists not only for the Windows OS.

There's no optional Qt style setting on different OS in this PR and qBittorrent relies on what Qt has to offer, so naming, available settings and OS compatibility is kept to be as close as possible to whatever Qt offers and things might change later on.

Including GUI or webUI changes in Windows NSIS installer instead of only built-in options afterwards is not worth it, I haven't even seen any software to allow to choose theme in the setup file.

  • Examples of dark and light theme color shades_ #21521

Your multiple issue/idea/feature request in a single issue report needs to closed and be marked as a duplicate of many others or at least split up as totally separate discussions.

Please try to make the colors ...

This Pull Request is to at first add extra basic options. There's already other pull requests that gives even more options. Too many changes at the same pull request would make it hard for anyone to quickly do a proper test and review.

Default theme icon color change should be discussed in a more appropriate place, not delay or confuse others by posting off-topic extra ideas here or post obvious duplicate ideas that has been already shared elsewhere by you or others.

If you didn't know, then You can already modify many default colors and icons since v4.6 was released or just use custom theme files.

qBittUser avatar Oct 16 '24 16:10 qBittUser

I have addressed the last comments and posted a new screenshot.

sledgehammer999 avatar Oct 20 '24 20:10 sledgehammer999