Added new improvements

This commit is contained in:
Robert Vokac 2024-02-11 10:30:08 +00:00
parent 8775f573bb
commit 91cc332912
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055
4 changed files with 12 additions and 5 deletions

View File

@ -528,6 +528,11 @@ public class TimeCalcManager {
window.setSize(520 + 20 + 100,
exitButton.getY() + 3 * exitButton.getHeight() + MARGIN);
while (true) {
Visibility visibility = Visibility
.valueOf(timeCalcApp.visibilityProperty.getValue());
if(timeCalcConfiguration.visibilityOnlyGreyOrNoneEnabledProperty.isEnabled() && visibility.isColored() ){
timeCalcApp.visibilityProperty.setValue(Visibility.GRAY.name());
}
//time.writeString();
if (stopBeforeEnd) {
window.setVisible(false);
@ -535,8 +540,7 @@ public class TimeCalcManager {
break;
}
Visibility visibility = Visibility
.valueOf(timeCalcApp.visibilityProperty.getValue());
componentRegistry.setVisible(visibility.isNotNone());
if (!visibility.isStronglyColored() || visibility.isGray()) {
configButton.setBackground(BG);

View File

@ -21,6 +21,9 @@ public enum Visibility {
return this == WEAKLY_COLORED;
}
public boolean isColored() {
return isStronglyColored() || isWeaklyColored();
}
public boolean isGray() {
return this == GRAY;
}

View File

@ -24,13 +24,13 @@ public class TimeCalcButton extends JButton {
public TimeCalcButton(String label) {
super(label);
new Timer(100, e -> repaint()).start();
}
public void setBounds(int x, int y) {
setBounds(x, y, BUTTON_WIDTH, BUTTON_HEIGHT);
this.originalBackground = getBackground();
this.originalForeground = getForeground();
new Timer(100, e -> repaint()).start();
}
public void setOriginalBackground() {

View File

@ -1,10 +1,10 @@
clock.hands.long=true
clock.hands.minute.enabled=false
clock.hands.minute.enabled=true
clock.hands.second.enabled=true
clock.hands.millisecond.enabled=false
battery.waves.enabled=true
default-visibility=STRONGLY_COLORED
visibility.only-grey-or-none.enabled=true
visibility.only-grey-or-none.enabled=false
jokes.enabled=true
commands.enabled=true
toasts.enabled=true