mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Convert downgrade window to adw.dialog
This commit is contained in:
2
data/icons/arrow-turn-left-down-symbolic.svg
Normal file
2
data/icons/arrow-turn-left-down-symbolic.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 2 11.015625 c 0.003906 0.261719 0.113281 0.515625 0.300781 0.703125 l 3 2.917969 c 0.390625 0.375 1.007813 0.375 1.398438 0 l 3 -2.917969 c 0.394531 -0.386719 0.402343 -1.019531 0.015625 -1.414062 c -0.382813 -0.398438 -1.015625 -0.40625 -1.414063 -0.019532 l -1.300781 1.265625 v -4.550781 c 0 -1.527344 1.441406 -2.996094 3 -3 h 4 c 0.550781 0 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 h -4 c -2.683594 0.003906 -5 2.347656 -5 5 v 4.550781 l -1.300781 -1.265625 c -0.398438 -0.386718 -1.03125 -0.378906 -1.417969 0.019532 c -0.183594 0.1875 -0.285156 0.445312 -0.28125 0.710937 z m 0 0" fill="#222222" fill-rule="evenodd"/></svg>
|
||||
|
After Width: | Height: | Size: 765 B |
@@ -1,75 +1,78 @@
|
||||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $DowngradeWindow: Adw.Window {
|
||||
default-width: 500;
|
||||
default-height: 450;
|
||||
modal: true;
|
||||
template $DowngradeWindow: Adw.Dialog {
|
||||
content-width: 500;
|
||||
content-height: 450;
|
||||
|
||||
Adw.ToolbarView main_toolbar_view {
|
||||
[top]
|
||||
HeaderBar header_bar {
|
||||
show-title-buttons: false;
|
||||
|
||||
[start]
|
||||
Button cancel_button {
|
||||
label: _("Cancel");
|
||||
}
|
||||
|
||||
[end]
|
||||
Button apply_button {
|
||||
sensitive: false;
|
||||
label: _("Downgrade");
|
||||
|
||||
styles [
|
||||
"suggested-action"
|
||||
]
|
||||
}
|
||||
Adw.HeaderBar header_bar {
|
||||
}
|
||||
|
||||
content: Adw.ToastOverlay toast_overlay {
|
||||
Stack main_stack {
|
||||
Box loading {
|
||||
orientation: vertical;
|
||||
spacing: 10;
|
||||
margin-top: 40;
|
||||
margin-bottom: 20;
|
||||
Overlay {
|
||||
[overlay]
|
||||
Button apply_button {
|
||||
valign: end;
|
||||
halign: center;
|
||||
valign: center;
|
||||
|
||||
Spinner {
|
||||
margin-bottom: 35;
|
||||
width-request: 30;
|
||||
height-request: 30;
|
||||
opacity: 0.5;
|
||||
spinning: true;
|
||||
margin-bottom: 12;
|
||||
sensitive: false;
|
||||
Adw.ButtonContent {
|
||||
label: _("Downgrade");
|
||||
icon-name: "arrow-turn-left-down-symbolic";
|
||||
}
|
||||
|
||||
Label loading_label {
|
||||
label: _("Fetching Releases");
|
||||
styles [
|
||||
"title-1",
|
||||
"title"
|
||||
]
|
||||
}
|
||||
|
||||
Label {
|
||||
label: _("This could take a while");
|
||||
styles ["description", "body"]
|
||||
}
|
||||
styles [
|
||||
"suggested-action",
|
||||
"pill"
|
||||
]
|
||||
}
|
||||
|
||||
Adw.PreferencesPage outerbox {
|
||||
Adw.PreferencesGroup {
|
||||
Adw.SwitchRow mask_row {
|
||||
title: _("Disable Updates");
|
||||
active: true;
|
||||
Stack main_stack {
|
||||
Box loading {
|
||||
orientation: vertical;
|
||||
spacing: 10;
|
||||
margin-top: 40;
|
||||
margin-bottom: 20;
|
||||
halign: center;
|
||||
valign: center;
|
||||
|
||||
Spinner {
|
||||
margin-bottom: 35;
|
||||
width-request: 30;
|
||||
height-request: 30;
|
||||
opacity: 0.5;
|
||||
spinning: true;
|
||||
}
|
||||
|
||||
Label loading_label {
|
||||
label: _("Fetching Releases");
|
||||
styles [
|
||||
"title-1",
|
||||
"title"
|
||||
]
|
||||
}
|
||||
|
||||
Label {
|
||||
label: _("This could take a while");
|
||||
styles ["description", "body"]
|
||||
}
|
||||
}
|
||||
|
||||
Adw.PreferencesGroup versions_group {
|
||||
title: _("Select a Release");
|
||||
description: _("This will uninstall the current release and install the chosen one instead. Note that downgrading can cause issues.");
|
||||
Adw.PreferencesPage outerbox {
|
||||
Adw.PreferencesGroup {
|
||||
Adw.SwitchRow mask_row {
|
||||
title: _("Disable Updates");
|
||||
active: true;
|
||||
}
|
||||
}
|
||||
|
||||
Adw.PreferencesGroup versions_group {
|
||||
title: _("Select a Release");
|
||||
description: _("This will uninstall the current release and install the chosen one instead. Note that downgrading can cause issues.");
|
||||
margin-bottom: 42;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user