-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pronterface panel background doesn't respect dark themes #931
Comments
@hroncok can you look into this? |
I have no idea how this works :( @lordofhyphens Is this a 2.x regression? I.e. did it work correctly with 1.x? |
We can utilize system theme background color, yet that would mean we need to rework all other colors as well: diff --git a/printrun/gui/__init__.py b/printrun/gui/__init__.py
index e2d2d4d..cd43d50 100644
--- a/printrun/gui/__init__.py
+++ b/printrun/gui/__init__.py
@@ -121,6 +121,7 @@ class MainWindow(wx.Frame):
self.panel = wx.Panel(self, -1)
self.reset_ui()
self.statefulControls = []
+ self._bgcolor = wx.SystemSettings.GetColour(wx.SYS_COLOUR_BACKGROUND)
def reset_ui(self):
self.panels = []
@@ -132,13 +133,13 @@ class MainWindow(wx.Frame):
return panel
def registerPanel(self, panel, add_to_list = True):
- panel.SetBackgroundColour(self.bgcolor)
+ panel.SetBackgroundColour(self._bgcolor)
if add_to_list: self.panels.append(panel)
def createTabbedGui(self):
self.notesizer = wx.BoxSizer(wx.VERTICAL)
self.notebook = wx.Notebook(self.panel)
- self.notebook.SetBackgroundColour(self.bgcolor)
+ self.notebook.SetBackgroundColour(self._bgcolor)
page1panel = self.newPanel(self.notebook)
page2panel = self.newPanel(self.notebook)
self.mainsizer_page1 = wx.BoxSizer(wx.VERTICAL) |
If user doesn't go to the settings and change the color themselves they will get their theme color, which is what they probably want anyway. Workarounds kliment#931
If user doesn't go to the settings and change the color themselves they will get their theme color, which is what they probably want anyway. Workarounds kliment#931
I've created #932 to workaround this a bit. |
That's a good solution - I think it's the best way to resolve this. |
Can you test your PR on OSX? I'm about to test on windows |
Sorry, somehow github is failing to upload an image, I'll try again |
This is how it looks on windows with #932 : |
Ok, let me hardcode white for windows. |
If user doesn't go to the settings and change the color themselves they will get their theme color, which is what they probably want anyway. Workarounds kliment#931 Doesn't work on Windows, there we hardcode #FFFFFF as it was before.
Works on Windows now. |
Did someone check with a dark theme on Windows? That is still a thing now and again (especially high contrast). |
I don't know how to do themes on Windows. Yet users with dark themes can still set the background color in settings. |
Using system window color instead of system background color on windows gives correct results even with dark themes (but high contrast black theme has bad readability of the temp graph) |
The background panel comes out hideous on a dark theme, and the high contrast washes everything else out.
For comparison, from Slic3r (which also uses wxWidgets):

The text was updated successfully, but these errors were encountered: