Skip to content

Commit

Permalink
some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rirusha committed Nov 26, 2024
1 parent c06f7b2 commit cd108c6
Showing 23 changed files with 646 additions and 44 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "vala-checkers"]
path = vala-checkers
url = https://gitlab.gnome.org/Rirusha/vala-checkers.git
36 changes: 33 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -6,18 +6,48 @@
{
"label": "Lint check",
"type": "shell",
"command": "io.elementary.vala-lint ${workspaceFolder}/src ${workspaceFolder}/tests",
"command": "io.elementary.vala-lint -d . -c vala-lint.conf",
"problemMatcher": []
},
{
"label": "Empty lines check",
"type": "shell",
"command": "python3 ${workspaceFolder}/vala-checkers/empty_lines_checker.py .",
"problemMatcher": []
},
{
"label": "Indentation check",
"type": "shell",
"command": "python3 ${workspaceFolder}/vala-checkers/indentation_checker.py .",
"problemMatcher": []
},
{
"label": "Full check",
"type": "shell",
"command": "echo 'Linter:' && io.elementary.vala-lint -d . -c vala-lint.conf && echo 'Empty lines:' && python3 ${workspaceFolder}/vala-checkers/empty_lines_checker.py . && echo 'Indentation:' && python3 ${workspaceFolder}/vala-checkers/indentation_checker.py .",
"problemMatcher": []
},
{
"label": "Lint .blp check",
"type": "shell",
"command": "blueprint-compiler format -s 2 data/ui/*.blp",
"problemMatcher": []
},
{
"label": "Fix all .blp",
"type": "shell",
"command": "blueprint-compiler format -f -s 2 data/ui/*.blp",
"problemMatcher": []
},
{
"label": "Run tests",
"type": "shell",
"command": "flatpak build --share=network --filesystem=${workspaceFolder} --filesystem=${workspaceFolder}/.flatpak/repo --env=PATH=~/bin:/bin:/usr/bin:/usr/local/bin:/usr/games:/app/bin:/usr/bin:/usr/lib/sdk/vala/bin --env=LD_LIBRARY_PATH=/usr/lib/sdk/vala/lib:/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --filesystem=${workspaceFolder}/_build ${workspaceFolder}/.flatpak/repo ninja -C _build test",
"command": "flatpak build --share=network --filesystem=${workspaceFolder} --filesystem=${workspaceFolder}/.flatpak/repo --env=PATH=$HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/games:/app/bin:/usr/bin:/usr/lib/sdk/vala/bin --env=LD_LIBRARY_PATH=/usr/lib/sdk/vala/lib:/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --filesystem=${workspaceFolder}/_build ${workspaceFolder}/.flatpak/repo ninja -C _build test",
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": []
}
]
}
}
5 changes: 5 additions & 0 deletions data/assets/icons/altmobile-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -38,7 +38,13 @@ endif

blueprints = custom_target('blueprints',
input: files(
'ui/base-page.blp',
'ui/help-overlay.blp',
'ui/language-page.blp',
'ui/language-row.blp',
'ui/languages-box.blp',
'ui/nothing-to-show.blp',
'ui/welcome-page.blp',
'ui/window.blp',
),
output: '.',
9 changes: 9 additions & 0 deletions data/space.rirusha.ReadySet.gresource.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/space/rirusha/ReadySet/icons/scalable/actions/">
<file alias="altmobile-symbolic.svg">assets/icons/altmobile-symbolic.svg</file>
</gresource>
<gresource prefix="/space/rirusha/ReadySet/">
<file alias="gtk/help-overlay.ui" preprocess="xml-stripblanks">ui/help-overlay.ui</file>
<file>style.css</file>
<file preprocess="xml-stripblanks">ui/base-page.ui</file>
<file preprocess="xml-stripblanks">ui/language-page.ui</file>
<file preprocess="xml-stripblanks">ui/language-row.ui</file>
<file preprocess="xml-stripblanks">ui/languages-box.ui</file>
<file preprocess="xml-stripblanks">ui/nothing-to-show.ui</file>
<file preprocess="xml-stripblanks">ui/welcome-page.ui</file>
<file preprocess="xml-stripblanks">ui/window.ui</file>
</gresource>
</gresources>
45 changes: 45 additions & 0 deletions data/ui/base-page.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using Gtk 4.0;
using Adw 1;

template $ReadySetBasePage : Adw.NavigationPage {
Adw.ToolbarView toolbar_view {
reveal-bottom-bars: bind template.is-ready;

[top]
Adw.HeaderBar {
title-widget: Adw.WindowTitle {
title: bind template.title;
};

[end]
ToggleButton {
icon-name: "system-search-symbolic";
active: bind template.search-enabled bidirectional;
visible: bind template.search-is-possible;
}
}

[bottom]
ListBox {
styles [
"boxed-list"
]

selection-mode: none;
margin-start: 12;
margin-top: 6;
margin-bottom: 12;
margin-end: 12;

Adw.ButtonRow {
styles [
"suggested-action",
]

activated => $apply_clicked();

title: _("Continue");
}
}
}
}
88 changes: 88 additions & 0 deletions data/ui/language-page.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
using Gtk 4.0;
using Adw 1;

template $ReadySetLanguagePage : $ReadySetBasePage {
title: _("Language");
search-is-possible: true;

content: Adw.ToolbarView view {
[top]
Stack title_stack {
hhomogeneous: true;
vhomogeneous: true;
transition-type: crossfade;
transition-duration: 200;

StackPage {
name: "title";
child: Label {
styles [
"title-2"
]

label: _("Let's start by choosing a language…");
wrap: true;
justify: center;
hexpand: true;
};
}

StackPage {
name: "search";
child: Adw.Clamp {
maximum-size: 680;
margin-end: 12;
margin-top: 6;
margin-bottom: 6;
margin-start: 12;

SearchEntry search_entry {
styles [
"card"
]

text: bind languages_box.search-query bidirectional;
height-request: 48;
placeholder-text: _("Search language");
hexpand: true;
}
};
}
}

content: ScrolledWindow {
propagate-natural-height: true;
hscrollbar-policy: never;

Adw.Clamp {
maximum-size: 680;
margin-end: 12;
margin-top: 12;
margin-bottom: 24;
margin-start: 12;

$ReadySetLanguagesBox languages_box {}
}
};

[bottom]
ListBox bottom_list_box {
styles [
"boxed-list"
]

selection-mode: none;
margin-start: 12;
margin-top: 6;
margin-bottom: 12;
margin-end: 12;

Adw.ButtonRow {
title: _("Show more languages");
start-icon-name: "view-more-symbolic";

activated => $on_show_more_activated();
}
}
};
}
6 changes: 6 additions & 0 deletions data/ui/language-row.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using Gtk 4.0;
using Adw 1;

template $ReadySetLanguageRow : Adw.ActionRow {
activatable: true;
}
16 changes: 16 additions & 0 deletions data/ui/languages-box.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Gtk 4.0;
using Adw 1;

template $ReadySetLanguagesBox : Adw.Bin {
Box {
orientation: vertical;

ListBox languages_listbox {
styles [
"boxed-list",
]

selection-mode: none;
}
}
}
36 changes: 36 additions & 0 deletions data/ui/nothing-to-show.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Gtk 4.0;
using Adw 1;

template $ReadySetNothingToShow : Adw.Bin {
Box {
orientation: vertical;
spacing: 18;
valign: center;
margin-bottom: 24;
margin-start: 12;
margin-end: 12;
margin-top: 24;

Image {
styles [
"icon",
"dim-label",
]

pixel-size: 120;
margin-bottom: 24;
icon-name: "system-search-symbolic";
}

Label {
styles [
"title-1"
]

label: _("Nothing to show");
wrap: true;
hexpand: true;
justify: center;
}
}
}
54 changes: 54 additions & 0 deletions data/ui/welcome-page.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using Gtk 4.0;
using Adw 1;

template $ReadySetWelcomePage : $ReadySetBasePage {
title: _("Welcome");
is-ready: true;

content: ScrolledWindow {
propagate-natural-height: true;
hscrollbar-policy: never;

Adw.Clamp clamp {
maximum-size: 680;
margin-end: 12;
margin-top: 12;
margin-bottom: 24;
margin-start: 12;

Box {
orientation: vertical;
spacing: 18;
valign: center;

Image {
styles [
"icon"
]

pixel-size: 120;
margin-bottom: 24;
icon-name: "altmobile-symbolic";
}

Label {
styles [
"title-1"
]

label: _("Welcome to ALT Mobile!");
wrap: true;
hexpand: true;
justify: center;
}

Label {
label: _("A free mobile operating system for free people");
wrap: true;
hexpand: true;
justify: center;
}
}
}
};
}
39 changes: 4 additions & 35 deletions data/ui/window.blp
Original file line number Diff line number Diff line change
@@ -7,42 +7,11 @@ template $ReadySetWindow : Adw.ApplicationWindow {
width-request: 360;
height-request: 294;

Adw.Breakpoint {
condition ("max-width: 450px")
setters {
main_label.label: "Narrow";
content: Adw.NavigationView nav_view {
$ReadySetWelcomePage {
title: "Welcome";
tag: "main";
}
}

content: Adw.ToolbarView {
[top]
Adw.HeaderBar {
[end]
MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
}

title-widget: Adw.WindowTitle {
title: "Hello World!";
};
}

content: Adw.Clamp {
margin-bottom: 12;
margin-end: 12;
margin-top: 12;
margin-start: 12;
maximum-size: 500;

Gtk.Label main_label {
styles [
"card"
]

label: "Wide";
}
};
};
}

Loading

0 comments on commit cd108c6

Please sign in to comment.