-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
238 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $OfflineView : Box { | ||
orientation: vertical; | ||
valign: center; | ||
|
||
Adw.StatusPage { | ||
title: _("Couldn't connect to the speedtest servers"); | ||
description: _("Make sure you are connected to the internet"); | ||
icon-name: "network-offline-symbolic"; | ||
styles [ "compact" ] | ||
template $OfflineView : Adw.Bin { | ||
Adw.ToolbarView { | ||
[top] | ||
Adw.HeaderBar { | ||
decoration-layout: ":close"; // We don't want the maximize button, even if someone has it enabled. | ||
} | ||
|
||
Adw.StatusPage { | ||
title: _("Couldn't connect to the speedtest servers"); | ||
description: _("Make sure you are connected to the internet"); | ||
icon-name: "network-offline-symbolic"; | ||
vexpand: true; | ||
styles [ "compact" ] | ||
|
||
Button { | ||
halign: center; | ||
Button { | ||
halign: center; | ||
|
||
label: _("Retry"); | ||
action-name: "app.retry_connect"; | ||
styles [ "pill", "suggested-action" ] | ||
label: _("Retry"); | ||
action-name: "app.retry_connect"; | ||
styles [ "pill", "suggested-action" ] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,155 @@ | ||
using Gtk 4.0; | ||
using Adw 1; | ||
|
||
template $TestView : Box { | ||
orientation: vertical; | ||
template $TestView : Adw.NavigationPage { | ||
Adw.BreakpointBin { | ||
width-request: 360; | ||
height-request: 294; | ||
|
||
Overlay { | ||
[overlay] | ||
ProgressBar progress { | ||
styles [ "osd" ] | ||
} | ||
|
||
[overlay] | ||
Box { | ||
orientation: vertical; | ||
spacing: 16; | ||
halign: center; | ||
valign: end; | ||
margin-bottom: 24; | ||
Adw.ToolbarView { | ||
[top] | ||
Adw.HeaderBar { | ||
decoration-layout: ":close"; // We don't want the maximize button, even if someone has it enabled. | ||
} | ||
|
||
Box { | ||
orientation: vertical; | ||
|
||
Label { | ||
label: _("Ping:"); | ||
styles [ "title-2" ] | ||
} | ||
Overlay { | ||
[overlay] | ||
ProgressBar progress { | ||
styles [ "osd" ] | ||
} | ||
|
||
Adw.Clamp horizontal_clamp { | ||
orientation: horizontal; | ||
maximum-size: 1300; | ||
|
||
Label { | ||
label: bind template.ping; | ||
styles [ "title-3" ] | ||
} | ||
} | ||
Adw.Clamp vertical_clamp { | ||
orientation: vertical; | ||
maximum-size: 800; | ||
|
||
Box { | ||
orientation: vertical; | ||
Box { | ||
orientation: vertical; | ||
margin-bottom: 8; | ||
|
||
Label { | ||
label: _("Jitter:"); | ||
styles [ "title-2" ] | ||
} | ||
Label title { | ||
label: bind template.server; | ||
margin-top: 8; | ||
margin-bottom: 8; | ||
styles [ "title-2" ] | ||
ellipsize: end; | ||
} | ||
|
||
Label { | ||
label: bind template.jitter; | ||
styles [ "title-3" ] | ||
} | ||
} | ||
} | ||
Box gauge_box { | ||
orientation: horizontal; | ||
margin-start: 8; | ||
margin-end: 8; | ||
margin-bottom: 8; | ||
|
||
[start] | ||
$Gauge download { | ||
label: _("Download:"); | ||
vexpand: true; | ||
hexpand: true; | ||
styles [ "dl" ] | ||
} | ||
|
||
Box { | ||
orientation: vertical; | ||
Box ping_box_1 { | ||
orientation: vertical; | ||
spacing: 16; | ||
halign: center; | ||
valign: end; | ||
width-request: 96; | ||
|
||
Label title { | ||
label: bind template.server; | ||
margin-top: 8; | ||
styles [ "title-2" ] | ||
} | ||
Box { | ||
orientation: vertical; | ||
|
||
Box { | ||
orientation: horizontal; | ||
spacing: 80; | ||
margin-start: 8; | ||
margin-end: 8; | ||
|
||
$Gauge download { | ||
label: _("Download:"); | ||
vexpand: true; | ||
hexpand: true; | ||
styles [ "dl" ] | ||
} | ||
Label { | ||
label: _("Ping:"); | ||
styles [ "title-2" ] | ||
} | ||
|
||
Label { | ||
label: bind template.ping; | ||
styles [ "title-3" ] | ||
} | ||
} | ||
|
||
Box { | ||
orientation: vertical; | ||
|
||
Label { | ||
label: _("Jitter:"); | ||
styles [ "title-2" ] | ||
} | ||
|
||
Label { | ||
label: bind template.jitter; | ||
styles [ "title-3" ] | ||
} | ||
} | ||
} | ||
|
||
[end] | ||
$Gauge upload { | ||
label: _("Upload:"); | ||
vexpand: true; | ||
hexpand: true; | ||
styles [ "up" ] | ||
} | ||
} | ||
|
||
Box ping_box_2 { | ||
orientation: horizontal; | ||
spacing: 24; | ||
halign: center; | ||
valign: end; | ||
visible: false; | ||
|
||
Box { | ||
orientation: vertical; | ||
|
||
$Gauge upload { | ||
label: _("Upload:"); | ||
vexpand: true; | ||
hexpand: true; | ||
styles [ "up" ] | ||
Label { | ||
label: _("Ping:"); | ||
styles [ "title-2" ] | ||
} | ||
|
||
Label { | ||
label: bind template.ping; | ||
styles [ "title-3" ] | ||
} | ||
} | ||
|
||
Box { | ||
orientation: vertical; | ||
|
||
Label { | ||
label: _("Jitter:"); | ||
styles [ "title-2" ] | ||
} | ||
|
||
Label { | ||
label: bind template.jitter; | ||
styles [ "title-3" ] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
Adw.Breakpoint { | ||
condition ("max-width: 500") | ||
setters { | ||
gauge_box.orientation: vertical; | ||
ping_box_1.visible: false; | ||
ping_box_2.visible: true; | ||
vertical_clamp.maximum-size: 1600; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.