Skip to content

Add Light style option to Application style #2558

Closed

Description

@ThomasBallatore

Describe the new feature

The new feature would add an option for "Light style" to the existing choices of "Dark style" and "Follow the desktop style" to Application style in the General tab under Preferences.

This would allow users to have their desktop style set to Dark but to still be able to use DB Browser for SQLite in Light mode.

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

No.

Does this feature exist in another product or project? Please provide a link.

Yes. For example, Discord as shown in following screenshot.

Do you have a screenshot? Please add screenshots to help explain your idea.

Screen Shot 2021-01-27 at 22 32 09

The menu bar above shows the system is in Dark mode but the app itself is in Light mode. While I love the new Dark mode in DB Browser for SQLite when working alone, I prefer Light mode when teaching and sharing my screen but do not want to change my system settings to Light mode because I prefer other apps to stay in Dark mode.

Activity

  1. mgrojo commented on Feb 1, 2021

    @mgrojo
    Member

    For future reference, this would be straightforward if the following is implemented in our used style sheet: ColinDuquesnoy/QDarkStyleSheet#240

  2. self-assigned this
    on Mar 31, 2021
  3. mgrojo commented on Mar 31, 2021

    @mgrojo
    Member

    Thanks to ColinDuquesnoy/QDarkStyleSheet, which provides now a light style, I could implement a new option for a light style. @ThomasBallatore could you try with tomorrow's nightly build and report any problem in your environment?

  4. ThomasBallatore commented on Apr 2, 2021

    @ThomasBallatore
    Author

    Hey, this is great—thanks!

    I tested the April 1st nightly build on my mac (MacBookPro15,3 running 20E5224a) and wanted to clarify a few things I'm seeing.

    When I select Preferences | General | Application style | Follow the desktop style, I see this when my Mac is in Light mode:

    Screen Shot 2021-04-02 at 16 32 30

    and this when my Mac is in Dark mode:

    Screen Shot 2021-04-02 at 16 33 02

    In DB Browser for SQLite, when I choose Light style, I see this:

    Screen Shot 2021-04-02 at 16 33 51

    and for Dark style, this:

    Screen Shot 2021-04-02 at 16 34 12

    While these latter two certainly look nice, I guess I was hoping for an option to simply show one of the first two by selecting something like light or dark in DB Browser. One issue, esp. with the new Light style, is the lower contrast. Also, it looks like the font size got tweaked to something a bit tiny for my aging eyes.

  5. mgrojo commented on Apr 2, 2021

    @mgrojo
    Member

    The rationale of this is that we follow your desktop style by default and we adjust our defined colours to match the lightness or darkness of it. Additionally we provide a particular style, now in two shades, light and dark. I don't know if one can choose the native style with a different shade as the desktop. Why do you need it to be different?

    Cannot the font be changed from Preferences?

  6. chrisjlocke commented on Apr 2, 2021

    @chrisjlocke
    Member

    There are three places to change the font sizes. There is a value on the 'general' tab of the preferences dialog

    image

    And on the 'data browser' tab, and one more on the 'sql' tab.

  7. ThomasBallatore commented on Apr 2, 2021

    @ThomasBallatore
    Author

    Ideally, what I was looking for is the ability to just keep DB Browser in Light mode even if my computer is in Dark mode. In my 4 screenshots above, that means #1, all the time. When teaching at night, I find it much better for students if I share my screen with DB Browser in Light mode (other programs are different).

    #3 and #1 look quite different to me and I suspect many will prefer the nice #3 but for me, #1 is more readable.

    As for font size, I'm guessing something odd happened behind the scenes with the Light style (#3)'s font size because I took these screenshots at the same time with no other settings changing.

    Thanks again for all your work on this awesome product!

  8. chrisjlocke commented on Apr 2, 2021

    @chrisjlocke
    Member

    As for font size, I'm guessing something odd happened behind the scenes with the Light style (#3)'s font size

    Can you just confirm changing the value in the preferences changes the font size? It may be that the style isn't looking at the right value, for example.

  9. ThomasBallatore commented on Apr 2, 2021

    @ThomasBallatore
    Author

    Just restarted and can confirm the font size is now fine without any adjustment. Just a glitch in the matrix before!

  10. chrisjlocke commented on Apr 2, 2021

    @chrisjlocke
    Member

    and we adjust our defined colours

    @mgrojo - I don't know how Qt works, but do we say 'use dark theme' and set the colours for each component/widget explicitly, or just tell Qt to use 'light' and 'dark' and it does what it wants?
    Was thinking along the lines of having 'palettes' where users could define exactly what colours are for each component, and allow downloading them as required. In ye olde Windows for example. we had this:

    image

    This was globally across all applications, but it could be good to define something for DB4S along these lines? That way, 'dark mode' could be anything the user wanted - bit darker, bit lighter, etc...

  11. chrisjlocke commented on Apr 2, 2021

    @chrisjlocke
    Member

    Just restarted and can confirm the font size is now fine

    Thanks for confirming! 👍

  12. 7 remaining items

  13. chrisjlocke commented on Nov 8, 2021

    @chrisjlocke
    Member

    @rafrafek - What version of DB4S are you using? Have you tried with the nightly version at all?
    When you say 'change' do you mean dynamically change the theme? Have you restarted DB4S after changing the desktop style? If you change the desktop style, DB4S won't immediately flip themes.

  14. rafrafek commented on Nov 8, 2021

    @rafrafek
    Contributor

    What version of DB4S are you using?

    3.12.2

    Have you tried with the nightly version at all?

    I'm sorry, I didn't try the nightly version.

    When you say 'change' do you mean dynamically change the theme?

    It doesn't work dynamically.

    Have you restarted DB4S after changing the desktop style?

    Yes, and it doesn't work after DB4S restart.

    If you change the desktop style, DB4S won't immediately flip themes.

    All the other apps I use do the flip immediately. It would be a nice option.

  15. chrisjlocke commented on Nov 8, 2021

    @chrisjlocke
    Member

    All the other apps I use do the flip immediately

    All? Notepad doesn't. ;)

    Considering it's job is to maintain databases, it seems weird it'd have to waste CPU cycles determining if the user has changed from light to dark theme. Do you switch themes often then?

  16. rafrafek commented on Nov 8, 2021

    @rafrafek
    Contributor

    All? Notepad doesn't. ;)

    I don't use notepad. I use VS Code, PyCharm, Outlook, Edge, Firefox etc., all of them change theme automatically.

    Considering it's job is to maintain databases, it seems weird it'd have to waste CPU cycles determining if the user has changed from light to dark theme.

    Can you just subscribe to system event or something like that?

    Do you switch themes often then?

    Twice a day. Light in the morning, dark in the evening.

  17. chrisjlocke commented on Nov 8, 2021

    @chrisjlocke
    Member

    Can you just subscribe to system event or something

    Qt is cross platform, so it's whether it passes on information from macOS, Windows or a plethora of Linux distributions.

    The issue is tagged as an enhancement already, so hopefully it can be looked into.
    Thanks for raising it! :)

  18. mgrojo commented on Jan 2, 2022

    @mgrojo
    Member

    I've discovered a problem with the dark and light styles (not the desktop style) and I'll add it here, since it is still open. A second click in a column to revert the sort order causes the column headers to disappear. The problem disappears with a refresh.

    I returned to d123fc9 in order to know if the last changes were responsible, but no, it is something older, maybe after the stylesheet update for this issue.

  19. justinclift commented on Jan 2, 2022

    @justinclift
    Member

    Ouch. Good catch though @mgrojo. 😄

  20. mgrojo commented on Jun 15, 2022

    @mgrojo
    Member

    The problem I mentioned should be fixed now, at least it's working for me.

    #2558 (comment)

  21. justinclift commented on Jun 17, 2022

    @justinclift
    Member

    Excellent effort @mgrojo! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions