Skip to content
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

Closed
lordofhyphens opened this issue Mar 31, 2018 · 16 comments
Closed

Pronterface panel background doesn't respect dark themes #931

lordofhyphens opened this issue Mar 31, 2018 · 16 comments

Comments

@lordofhyphens
Copy link

The background panel comes out hideous on a dark theme, and the high contrast washes everything else out.

image

For comparison, from Slic3r (which also uses wxWidgets):
image

@kliment
Copy link
Owner

kliment commented Mar 31, 2018

@hroncok can you look into this?

@hroncok
Copy link
Collaborator

hroncok commented Mar 31, 2018

I have no idea how this works :(

@lordofhyphens Is this a 2.x regression? I.e. did it work correctly with 1.x?

@hroncok
Copy link
Collaborator

hroncok commented Apr 1, 2018

1.x (yet with GTK3):

pronterface1

@hroncok
Copy link
Collaborator

hroncok commented Apr 1, 2018

We can utilize system theme background color, yet that would mean we need to rework all other colors as well:

p1

p2

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)

@hroncok
Copy link
Collaborator

hroncok commented Apr 1, 2018

Either we call it NOTABUG and as a workaround I recommend you go to Options and change the background color:

p3

Or we need to nuke the background color option and instead use the theme color everywhere.

hroncok added a commit to hroncok/Printrun that referenced this issue Apr 1, 2018
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
hroncok added a commit to hroncok/Printrun that referenced this issue Apr 1, 2018
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
@hroncok
Copy link
Collaborator

hroncok commented Apr 1, 2018

I've created #932 to workaround this a bit.

@kliment
Copy link
Owner

kliment commented Apr 1, 2018

That's a good solution - I think it's the best way to resolve this.

@kliment
Copy link
Owner

kliment commented Apr 1, 2018

Can you test your PR on OSX? I'm about to test on windows

@kliment
Copy link
Owner

kliment commented Apr 1, 2018

Sorry, somehow github is failing to upload an image, I'll try again

@kliment
Copy link
Owner

kliment commented Apr 1, 2018

This is how it looks on windows with #932 :

selection_055

@hroncok
Copy link
Collaborator

hroncok commented Apr 1, 2018

Ok, let me hardcode white for windows.

hroncok added a commit to hroncok/Printrun that referenced this issue Apr 1, 2018
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.
@kliment
Copy link
Owner

kliment commented Apr 1, 2018

Works on Windows now.

@kliment
Copy link
Owner

kliment commented Apr 1, 2018

I've merged #932, so I think this is resolved. Thanks @hroncok !

@kliment kliment closed this as completed Apr 1, 2018
@lordofhyphens
Copy link
Author

Did someone check with a dark theme on Windows? That is still a thing now and again (especially high contrast).

@hroncok
Copy link
Collaborator

hroncok commented Apr 1, 2018

I don't know how to do themes on Windows. Yet users with dark themes can still set the background color in settings.

@kliment
Copy link
Owner

kliment commented Apr 1, 2018

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)

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

No branches or pull requests

3 participants