It looks like you're new here. If you want to get involved, click one of these buttons!
Here is a nice script for those who love fancy "dark mode":
palette = RBA::QPalette::new
palette.setColorGroup(RBA::QPalette::Active,
RBA::QBrush::new(RBA::QColor::new("#f0f0f0")), # windowText
RBA::QBrush::new(RBA::QColor::new("#303030")), # button
RBA::QBrush::new(RBA::QColor::new("#505050")), # light
RBA::QBrush::new(RBA::QColor::new("#707070")), # dark
RBA::QBrush::new(RBA::QColor::new("#909090")), # mid
RBA::QBrush::new(RBA::QColor::new("#e0e0e0")), # text
RBA::QBrush::new(RBA::QColor::new("#909090")), # brightText
RBA::QBrush::new(RBA::QColor::new("#202020")), # base
RBA::QBrush::new(RBA::QColor::new("#101010")), # window
)
palette.setColorGroup(RBA::QPalette::Inactive,
RBA::QBrush::new(RBA::QColor::new("#f0f0f0")), # windowText
RBA::QBrush::new(RBA::QColor::new("#303030")), # button
RBA::QBrush::new(RBA::QColor::new("#505050")), # light
RBA::QBrush::new(RBA::QColor::new("#707070")), # dark
RBA::QBrush::new(RBA::QColor::new("#909090")), # mid
RBA::QBrush::new(RBA::QColor::new("#e0e0e0")), # text
RBA::QBrush::new(RBA::QColor::new("#909090")), # brightText
RBA::QBrush::new(RBA::QColor::new("#202020")), # base
RBA::QBrush::new(RBA::QColor::new("#101010")), # window
)
palette.setColorGroup(RBA::QPalette::Disabled,
RBA::QBrush::new(RBA::QColor::new("#808080")), # windowText
RBA::QBrush::new(RBA::QColor::new("#303030")), # button
RBA::QBrush::new(RBA::QColor::new("#505050")), # light
RBA::QBrush::new(RBA::QColor::new("#606060")), # dark
RBA::QBrush::new(RBA::QColor::new("#686868")), # mid
RBA::QBrush::new(RBA::QColor::new("#707070")), # text
RBA::QBrush::new(RBA::QColor::new("#686868")), # brightText
RBA::QBrush::new(RBA::QColor::new("#202020")), # base
RBA::QBrush::new(RBA::QColor::new("#101010")), # window
)
RBA::QApplication::setPalette(palette)
Set the "run on startup" flag and enjoy night mode:
Matthias
Comments
Hi Matthias,
Thanks a lot for the "dark mode" script! Personally, I prefer to use "dark mode" whenever it is available.
I noticed two things:
1) The top bar of the main window (with the menus) and the top bar of the layout panel(s) seem to stay "light" in my case and the menu names are hardly readable...
2) The "Macro Development" window still has quite some "light" sub areas and the names of the folders and files in the "Local" map are hardly readable...
Maybe it is related to the the KLayout version, 0.28 <> 0.27.9?
Cheers,
Tomas
Ok, I need to say that was a first shot
I understand that Qt borrows parts of the styling from the underlying system. On Windows that's probably tab widgets and similar. I guess the way to do that properly is to use Qt style sheets rather simply changing the palette.
On Linux however, the script works rather nicely. Some icons are hard to see, but as I said - that's a first shot only.
Matthias