You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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?
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:
and this when my Mac is in Dark mode:
In DB Browser for SQLite, when I choose Light style, I see this:
and for Dark style, this:
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.
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?
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!
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.
@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:
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...
@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.
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?
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.
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.
Activity
mgrojo commentedon Feb 1, 2021
For future reference, this would be straightforward if the following is implemented in our used style sheet: ColinDuquesnoy/QDarkStyleSheet#240
Update QDarkStyleSheet to v3.0.rc and add new light style
mgrojo commentedon Mar 31, 2021
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?
ThomasBallatore commentedon Apr 2, 2021
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:
and this when my Mac is in Dark mode:
In DB Browser for SQLite, when I choose Light style, I see this:
and for Dark style, this:
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.
mgrojo commentedon Apr 2, 2021
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?
chrisjlocke commentedon Apr 2, 2021
There are three places to change the font sizes. There is a value on the 'general' tab of the preferences dialog
And on the 'data browser' tab, and one more on the 'sql' tab.
ThomasBallatore commentedon Apr 2, 2021
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!
chrisjlocke commentedon Apr 2, 2021
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.
ThomasBallatore commentedon Apr 2, 2021
Just restarted and can confirm the font size is now fine without any adjustment. Just a glitch in the matrix before!
chrisjlocke commentedon Apr 2, 2021
@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:
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...
chrisjlocke commentedon Apr 2, 2021
Thanks for confirming! 👍
7 remaining items
chrisjlocke commentedon Nov 8, 2021
@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.
rafrafek commentedon Nov 8, 2021
3.12.2
I'm sorry, I didn't try the nightly version.
It doesn't work dynamically.
Yes, and it doesn't work after DB4S restart.
All the other apps I use do the flip immediately. It would be a nice option.
chrisjlocke commentedon Nov 8, 2021
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?
rafrafek commentedon Nov 8, 2021
I don't use notepad. I use VS Code, PyCharm, Outlook, Edge, Firefox etc., all of them change theme automatically.
Can you just subscribe to system event or something like that?
Twice a day. Light in the morning, dark in the evening.
chrisjlocke commentedon Nov 8, 2021
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! :)
mgrojo commentedon Jan 2, 2022
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.
justinclift commentedon Jan 2, 2022
Ouch. Good catch though @mgrojo. 😄
Fix repositioning of filter widgets after the second click on the header
mgrojo commentedon Jun 15, 2022
The problem I mentioned should be fixed now, at least it's working for me.
#2558 (comment)
justinclift commentedon Jun 17, 2022
Excellent effort @mgrojo! 😄
Fix repositioning of filter widgets after the second click on the header
Dark/Light styles: upgraded to QDarkStyle v3.2.1