Merge lp:~tapaal-contributor/tapaal/ubuntu-dark-theme-improvements-1897539 into lp:tapaal

Proposed by Peter Haahr Taankvist
Status: Merged
Approved by: Jiri Srba
Approved revision: 1109
Merged at revision: 1108
Proposed branch: lp:~tapaal-contributor/tapaal/ubuntu-dark-theme-improvements-1897539
Merge into: lp:tapaal
Diff against target: 40 lines (+11/-1)
2 files modified
src/pipe/gui/GuiFrame.java (+5/-1)
src/pipe/gui/graphicElements/Transition.java (+6/-0)
To merge this branch: bzr merge lp:~tapaal-contributor/tapaal/ubuntu-dark-theme-improvements-1897539
Reviewer Review Type Date Requested Status
Jiri Srba Approve
Peter Haahr Taankvist (community) Needs Resubmitting
Kenneth Yrke Jørgensen Needs Fixing
Review via email: mp+392037@code.launchpad.net

Commit message

This improves some dark mode problems, but do not remove them entirely.

To post a comment you must log in.
Revision history for this message
Kenneth Yrke Jørgensen (yrke) wrote :

Please update the comments before the changes, to include a link/bugid to where the issue is described, and make sure we have a good report displaying the issue. This helps us later on to determent if the code is still relevant.

review: Needs Fixing
1108. By Peter Taankvist <email address hidden>

Added a link to the bugreport

1109. By Peter Taankvist <email address hidden>

Added a bugreport and a link to the bugreport for the second comment

Revision history for this message
Peter Haahr Taankvist (ptaank) wrote :

Tried to add some bugreports and links to these for each comment, as well as more descriptive comments.

review: Needs Resubmitting
Revision history for this message
Jiri Srba (srba) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/pipe/gui/GuiFrame.java'
2--- src/pipe/gui/GuiFrame.java 2020-09-21 18:24:30 +0000
3+++ src/pipe/gui/GuiFrame.java 2020-10-30 12:24:44 +0000
4@@ -540,7 +540,6 @@
5 Logger.log("Error loading L&F: " + exc);
6 }
7
8-
9 if (Platform.isMac()) {
10
11 //Set specific settings
12@@ -556,6 +555,11 @@
13 }
14
15 this.setIconImage(ResourceManager.getIcon("icon.png").getImage());
16+ //This makes it look slightly better in ubuntu dark mode
17+ //By removing a white bar around the whole drawing surface
18+ //https://bugs.launchpad.net/tapaal/+bug/1902226
19+ SwingUtilities.updateComponentTreeUI(this);
20+ this.pack();
21 }
22
23
24
25=== modified file 'src/pipe/gui/graphicElements/Transition.java'
26--- src/pipe/gui/graphicElements/Transition.java 2020-08-04 08:19:44 +0000
27+++ src/pipe/gui/graphicElements/Transition.java 2020-10-30 12:24:44 +0000
28@@ -83,6 +83,12 @@
29 super.paintComponent(g);
30 Graphics2D g2 = (Graphics2D) g;
31
32+ //Oct 30 2020: In Ubuntu dark mode the namelabel is hidden for some reason
33+ //This line fixes it, though it should not matter
34+ //https://bugs.launchpad.net/tapaal/+bug/1897539
35+ pnName.setForeground(Pipe.ELEMENT_LINE_COLOUR);
36+
37+
38 g2.setStroke(new BasicStroke(2.0f));
39 g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
40 RenderingHints.VALUE_ANTIALIAS_ON);

Subscribers

People subscribed via source and target branches