Skip to content

Commit

Permalink
the beginnings of navigationpage
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEvilSkeleton committed Jan 9, 2025
1 parent e3f6fb0 commit 6fd13ca
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 192 deletions.
110 changes: 51 additions & 59 deletions bottles/frontend/ui/details.blp
Original file line number Diff line number Diff line change
@@ -1,86 +1,78 @@
using Gtk 4.0;
using Adw 1;

template $DetailsView: Adw.Bin {
Adw.Leaflet leaflet {
can-navigate-back: true;
can-unfold: false;
hexpand: true;
template $DetailsView: Adw.NavigationPage {
title: _("Details");
tag: "details";

Box {
orientation: vertical;
child: Adw.Bin {
Adw.Leaflet leaflet {
can-navigate-back: true;
can-unfold: false;
hexpand: true;

Box {
orientation: vertical;

Adw.HeaderBar sidebar_headerbar {
show-end-title-buttons: false;
Adw.HeaderBar sidebar_headerbar {
show-end-title-buttons: false;

title-widget: Adw.WindowTitle sidebar_title {
title: _("Details");
};
title-widget: Adw.WindowTitle sidebar_title {
title: _("Details");
};

[start]
Button btn_back {
icon-name: "go-previous-symbolic";
tooltip-text: _("Go Back");
[end]
Box default_actions {}
}

[end]
Box default_actions {}
Box default_view {}
}

Box default_view {}
}

Adw.LeafletPage {
navigatable: false;

child: Separator panel_separator {
orientation: vertical;
Adw.LeafletPage {
navigatable: false;

styles [
"sidebar",
]
};
}
child: Separator panel_separator {
orientation: vertical;

Box content {
orientation: vertical;
styles [
"sidebar",
]
};
}

Adw.HeaderBar content_headerbar {
show-start-title-buttons: false;
Box content {
orientation: vertical;

title-widget: Adw.WindowTitle content_title {};
Adw.HeaderBar content_headerbar {
show-start-title-buttons: false;

[start]
Button btn_back_sidebar {
icon-name: "go-previous-symbolic";
tooltip-text: _("Go Back");
visible: false;
}
title-widget: Adw.WindowTitle content_title {};

[end]
Box box_actions {}
[end]
Box box_actions {}

[end]
MenuButton btn_operations {
visible: false;
tooltip-text: _("Operations");
popover: pop_tasks;
[end]
MenuButton btn_operations {
visible: false;
tooltip-text: _("Operations");
popover: pop_tasks;

Spinner spinner_tasks {}
Spinner spinner_tasks {}

styles [
"flat",
]
styles [
"flat",
]
}
}
}

Stack stack_bottle {
transition-type: crossfade;
hexpand: true;
vexpand: true;
Stack stack_bottle {
transition-type: crossfade;
hexpand: true;
vexpand: true;
}
}
}
}
};
}

Popover pop_tasks {
Expand Down
73 changes: 39 additions & 34 deletions bottles/frontend/ui/importer.blp
Original file line number Diff line number Diff line change
@@ -1,53 +1,58 @@
using Gtk 4.0;
using Adw 1;

template $ImporterView: Adw.Bin {
Box {
orientation: vertical;
template $ImporterView: Adw.NavigationPage {
title: _("Import");
tag: "import";

HeaderBar headerbar {
title-widget: Adw.WindowTitle window_title {};
child: Adw.Bin {
Box {
orientation: vertical;

[start]
Button btn_back {
tooltip-text: _("Go Back");
icon-name: "go-previous-symbolic";
}
HeaderBar headerbar {
title-widget: Adw.WindowTitle window_title {};

[end]
Box box_actions {
MenuButton btn_import_backup {
tooltip-text: _("Import a Bottle backup");
popover: pop_backup;
icon-name: "document-send-symbolic";
[start]
Button btn_back {
tooltip-text: _("Go Back");
icon-name: "go-previous-symbolic";
}

Button btn_find_prefixes {
tooltip-text: _("Search again for prefixes");
icon-name: "view-refresh-symbolic";
[end]
Box box_actions {
MenuButton btn_import_backup {
tooltip-text: _("Import a Bottle backup");
popover: pop_backup;
icon-name: "document-send-symbolic";
}

Button btn_find_prefixes {
tooltip-text: _("Search again for prefixes");
icon-name: "view-refresh-symbolic";
}
}
}
}

Adw.PreferencesPage {
Adw.StatusPage status_page {
vexpand: true;
icon-name: "document-save-symbolic";
title: _("No Prefixes Found");
description: _("No external prefixes were found. Does Bottles have access to them?\nUse the icon on the top to import a bottle from a backup.");
}
Adw.PreferencesPage {
Adw.StatusPage status_page {
vexpand: true;
icon-name: "document-save-symbolic";
title: _("No Prefixes Found");
description: _("No external prefixes were found. Does Bottles have access to them?\nUse the icon on the top to import a bottle from a backup.");
}

Adw.PreferencesGroup group_prefixes {
visible: false;
Adw.PreferencesGroup group_prefixes {
visible: false;

ListBox list_prefixes {
styles [
"boxed-list",
]
ListBox list_prefixes {
styles [
"boxed-list",
]
}
}
}
}
}
};
}

Popover pop_backup {
Expand Down
127 changes: 66 additions & 61 deletions bottles/frontend/ui/window.blp
Original file line number Diff line number Diff line change
Expand Up @@ -5,76 +5,81 @@ template $BottlesWindow: Adw.ApplicationWindow {
title: "Bottles";
close-request => $on_close_request();

content: Adw.ToastOverlay toasts {
Adw.Leaflet main_leaf {
can-unfold: false;
can-navigate-back: false;

Box {
orientation: vertical;

HeaderBar headerbar {
title-widget: Adw.ViewSwitcherTitle view_switcher_title {
title: "Bottles";
stack: stack_main;
};
Adw.Breakpoint {
condition ('max-width: 550sp')

Button btn_add {
tooltip-text: _("Create New Bottle");
icon-name: "list-add-symbolic";
}

Box box_actions {}

styles [
"titlebar",
]

[end]
MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
tooltip-text: _("Main Menu");
primary: true;
}
setters {
header_bar.title-widget: null;
view_switcher_bar.reveal: true;
}
}

[end]
ToggleButton btn_search {
tooltip-text: _("Search");
icon-name: "system-search-symbolic";
visible: false;
content: Adw.ToastOverlay toasts {
child: Adw.NavigationView navigation_view {
Adw.NavigationPage {
tag: "overview-page";
title: _("Overview");
child: Adw.ToolbarView {
[top]
Adw.HeaderBar header_bar {
title-widget: Adw.ViewSwitcher view_switcher_title {
policy: wide;
stack: stack_main;
};
Button btn_add {
tooltip-text: _("Create New Bottle");
icon-name: "list-add-symbolic";
}
[end]
MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
tooltip-text: _("Main Menu");
primary: true;
}
[end]
ToggleButton btn_search {
tooltip-text: _("Search");
icon-name: "system-search-symbolic";
visible: false;
}
[end]
Button btn_donate {
tooltip-text: _("Donate");
icon-name: "emblem-favorite-symbolic";
}
[end]
Button btn_noconnection {
visible: false;
tooltip-text: _("You don\'t seem connected to the internet. Without it you will not be able to download essential components. Click this icon when you have reestablished the connection.");
icon-name: "network-error-symbolic";
}
}

[end]
Button btn_donate {
tooltip-text: _("Donate");
icon-name: "emblem-favorite-symbolic";
[top]
Adw.Clamp {
maximum-size: 400;
child: SearchBar search_bar {
margin-top: 6;

child: SearchEntry entry_search {
placeholder-text: _("Search your bottles…");
hexpand: true;
};
};
}

[end]
Button btn_noconnection {
visible: false;
tooltip-text: _("You don\'t seem connected to the internet. Without it you will not be able to download essential components. Click this icon when you have reestablished the connection.");
icon-name: "network-error-symbolic";
}
}
content: Adw.ViewStack stack_main {
enable-transitions: true;
};

SearchBar search_bar {
SearchEntry entry_search {
placeholder-text: _("Search your bottles…");
[bottom]
Adw.ViewSwitcherBar view_switcher_bar {
stack: stack_main;
}
}

Adw.ViewStack stack_main {
vexpand: true;
}

Adw.ViewSwitcherBar view_switcher_bar {
stack: stack_main;
reveal: bind view_switcher_title.title-visible;
}
};
}
}
};
};
}

Expand Down
Loading

0 comments on commit 6fd13ca

Please sign in to comment.