mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-10-25 06:13:57 +08:00
[ui] turn the reconnect action into a button
This commit is contained in:
@@ -1486,25 +1486,24 @@ export component MainWindow inherits Window {
|
|||||||
text: root.current-version;
|
text: root.current-version;
|
||||||
font-size: 11px; color: WorkbenchStyle.muted; vertical-alignment: center;
|
font-size: 11px; color: WorkbenchStyle.muted; vertical-alignment: center;
|
||||||
}
|
}
|
||||||
if !root.signal-connected && !root.signal-tls-error: Rectangle {
|
if !root.signal-connected && !root.signal-tls-error: WorkbenchButton {
|
||||||
x: parent.width - self.width - 20px;
|
x: parent.width - self.width - 20px;
|
||||||
y: 0px;
|
y: (parent.height - self.height) / 2;
|
||||||
height: parent.height;
|
width: max(64px, reconnect-label-metrics.preferred-width + 22px);
|
||||||
width: reconnect-label.preferred-width;
|
height: 22px;
|
||||||
reconnect-label := Text {
|
text: UiStrings.signal-reconnect;
|
||||||
text: UiStrings.signal-reconnect;
|
text-size: 11px;
|
||||||
color: WorkbenchStyle.accent;
|
text-color: WorkbenchStyle.accent;
|
||||||
font-size: 11px;
|
clicked => {
|
||||||
horizontal-alignment: center;
|
root.copy-feedback = CopyFeedback.idle;
|
||||||
vertical-alignment: center;
|
root.signal-reconnect-requested();
|
||||||
}
|
}
|
||||||
TouchArea {
|
reconnect-label-metrics := Text {
|
||||||
mouse-cursor: pointer;
|
visible: false;
|
||||||
clicked => {
|
text: UiStrings.signal-reconnect;
|
||||||
root.copy-feedback = CopyFeedback.idle;
|
font-size: 11px;
|
||||||
root.signal-reconnect-requested();
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user