mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added new improvements
This commit is contained in:
parent
8775f573bb
commit
91cc332912
@ -528,6 +528,11 @@ public class TimeCalcManager {
|
|||||||
window.setSize(520 + 20 + 100,
|
window.setSize(520 + 20 + 100,
|
||||||
exitButton.getY() + 3 * exitButton.getHeight() + MARGIN);
|
exitButton.getY() + 3 * exitButton.getHeight() + MARGIN);
|
||||||
while (true) {
|
while (true) {
|
||||||
|
Visibility visibility = Visibility
|
||||||
|
.valueOf(timeCalcApp.visibilityProperty.getValue());
|
||||||
|
if(timeCalcConfiguration.visibilityOnlyGreyOrNoneEnabledProperty.isEnabled() && visibility.isColored() ){
|
||||||
|
timeCalcApp.visibilityProperty.setValue(Visibility.GRAY.name());
|
||||||
|
}
|
||||||
//time.writeString();
|
//time.writeString();
|
||||||
if (stopBeforeEnd) {
|
if (stopBeforeEnd) {
|
||||||
window.setVisible(false);
|
window.setVisible(false);
|
||||||
@ -535,8 +540,7 @@ public class TimeCalcManager {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Visibility visibility = Visibility
|
|
||||||
.valueOf(timeCalcApp.visibilityProperty.getValue());
|
|
||||||
componentRegistry.setVisible(visibility.isNotNone());
|
componentRegistry.setVisible(visibility.isNotNone());
|
||||||
if (!visibility.isStronglyColored() || visibility.isGray()) {
|
if (!visibility.isStronglyColored() || visibility.isGray()) {
|
||||||
configButton.setBackground(BG);
|
configButton.setBackground(BG);
|
||||||
|
@ -21,6 +21,9 @@ public enum Visibility {
|
|||||||
return this == WEAKLY_COLORED;
|
return this == WEAKLY_COLORED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isColored() {
|
||||||
|
return isStronglyColored() || isWeaklyColored();
|
||||||
|
}
|
||||||
public boolean isGray() {
|
public boolean isGray() {
|
||||||
return this == GRAY;
|
return this == GRAY;
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,13 @@ public class TimeCalcButton extends JButton {
|
|||||||
|
|
||||||
public TimeCalcButton(String label) {
|
public TimeCalcButton(String label) {
|
||||||
super(label);
|
super(label);
|
||||||
|
new Timer(100, e -> repaint()).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBounds(int x, int y) {
|
public void setBounds(int x, int y) {
|
||||||
setBounds(x, y, BUTTON_WIDTH, BUTTON_HEIGHT);
|
setBounds(x, y, BUTTON_WIDTH, BUTTON_HEIGHT);
|
||||||
this.originalBackground = getBackground();
|
this.originalBackground = getBackground();
|
||||||
this.originalForeground = getForeground();
|
this.originalForeground = getForeground();
|
||||||
new Timer(100, e -> repaint()).start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOriginalBackground() {
|
public void setOriginalBackground() {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
clock.hands.long=true
|
clock.hands.long=true
|
||||||
clock.hands.minute.enabled=false
|
clock.hands.minute.enabled=true
|
||||||
clock.hands.second.enabled=true
|
clock.hands.second.enabled=true
|
||||||
clock.hands.millisecond.enabled=false
|
clock.hands.millisecond.enabled=false
|
||||||
battery.waves.enabled=true
|
battery.waves.enabled=true
|
||||||
default-visibility=STRONGLY_COLORED
|
default-visibility=STRONGLY_COLORED
|
||||||
visibility.only-grey-or-none.enabled=true
|
visibility.only-grey-or-none.enabled=false
|
||||||
jokes.enabled=true
|
jokes.enabled=true
|
||||||
commands.enabled=true
|
commands.enabled=true
|
||||||
toasts.enabled=true
|
toasts.enabled=true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user