Skip to content

Commit 54fb6a9

Browse files
committed
Moved version indicator
1 parent 6be6787 commit 54fb6a9

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

app/src/processing/app/ui/EditorFooter.java

+24-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
import javax.swing.*;
4141

42+
import processing.app.Base;
4243
import processing.app.Mode;
4344
import processing.app.Sketch;
4445
import processing.app.contrib.ContributionManager;
@@ -83,10 +84,14 @@ public class EditorFooter extends Box {
8384
Image gradient;
8485
Color bgColor;
8586

87+
Box tabBar;
88+
8689
JPanel cardPanel;
8790
CardLayout cardLayout;
8891
Controller controller;
8992

93+
JLabel version;
94+
9095
int updateCount;
9196

9297

@@ -98,8 +103,17 @@ public EditorFooter(Editor eddie) {
98103
cardPanel = new JPanel(cardLayout);
99104
add(cardPanel);
100105

106+
tabBar = new Box(BoxLayout.X_AXIS);
107+
101108
controller = new Controller();
102-
add(controller);
109+
tabBar.add(controller);
110+
111+
version = new JLabel(Base.getVersionName());
112+
version.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, MARGIN));
113+
114+
tabBar.add(version);
115+
116+
add(tabBar);
103117

104118
updateTheme();
105119
}
@@ -175,6 +189,15 @@ public void updateTheme() {
175189

176190
// replace colors for the "updates" indicator
177191
controller.updateTheme();
192+
193+
tabBar.setOpaque(true);
194+
tabBar.setBackground(bgColor);
195+
196+
var updatesTextColor = Theme.getColor("footer.updates.text.color");
197+
var withAlpha = new Color(updatesTextColor.getRed(), updatesTextColor.getGreen(), updatesTextColor.getBlue(), 128);
198+
199+
version.setForeground(withAlpha);
200+
version.setFont(font);
178201
}
179202

180203

0 commit comments

Comments
 (0)