Impove UI

parent 6dbf770f
...@@ -2,22 +2,36 @@ using Gtk 4.0; ...@@ -2,22 +2,36 @@ using Gtk 4.0;
using Adw 1; using Adw 1;
template $TuneitWindow: Adw.ApplicationWindow { template $TuneitWindow: Adw.ApplicationWindow {
width-request: 360;
height-request: 294;
default-height: 600;
default-width: 800;
title: _("TuneIt");
Adw.Breakpoint { Adw.Breakpoint {
condition ("max-width: 400sp") condition ("max-width: 500sp")
setters { setters {
header_bar.title-widget: null; header_view_switcher.visible: false;
main_toolbar.top-bar-style: flat; main_toolbar.reveal-bottom-bars: true;
settinga_content_bar.visible: true; main_toolbar.reveal-top-bars: false;
switcher_bar.reveal: true;
settings_split_view.collapsed: true; settings_split_view.collapsed: true;
} }
} }
content: Adw.ToolbarView main_toolbar{
top-bar-style: raised_border; content: Adw.ToolbarView main_toolbar {
top-bar-style: raised;
bottom-bar-style: raised;
reveal-bottom-bars: false;
[top] [top]
Adw.HeaderBar header_bar { Adw.HeaderBar header_bar {
[title]
Adw.ViewSwitcher header_view_switcher {
policy: wide;
stack: main_stack;
}
[end] [end]
MenuButton { MenuButton {
icon-name: "open-menu-symbolic"; icon-name: "open-menu-symbolic";
...@@ -25,71 +39,89 @@ template $TuneitWindow: Adw.ApplicationWindow { ...@@ -25,71 +39,89 @@ template $TuneitWindow: Adw.ApplicationWindow {
primary: true; primary: true;
tooltip-text: _("Main Menu"); tooltip-text: _("Main Menu");
} }
[title]
Adw.ViewSwitcher {
policy: wide;
stack: main_stack;
}
} }
Adw.ViewStack main_stack { Adw.ViewStack main_stack {
Adw.ViewStackPage { Adw.ViewStackPage {
child: Box { icon-name: "preferences-system";
Adw.NavigationSplitView settings_split_view { name: "settings";
hexpand: true; title: _("Settings");
content: Adw.NavigationPage {
Adw.ToolbarView { child: Adw.NavigationSplitView settings_split_view {
[top] hexpand: true;
Adw.HeaderBar settinga_content_bar {
decoration-layout: ""; content: Adw.NavigationPage {
visible: false; title: bind settings_pagestack.visible-child-name;
Adw.ToolbarView {
reveal-top-bars: bind main_toolbar.reveal-top-bars inverted;
[top]
Adw.HeaderBar header_bar2 {
[end]
MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
primary: true;
tooltip-text: _("Main Menu");
} }
}
Stack settings_pagestack {}
}
};
sidebar: Adw.NavigationPage {
title: _("Sections");
Adw.ToolbarView {
reveal-top-bars: bind main_toolbar.reveal-top-bars inverted;
Stack settings_pagestack {} [top]
Adw.HeaderBar {
[end]
MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
primary: true;
tooltip-text: _("Main Menu");
}
} }
};
ScrolledWindow {
sidebar: Adw.NavigationPage { propagate-natural-height: true;
Adw.ClampScrollable { hscrollbar-policy: never;
margin-bottom: 8;
margin-end: 8; Adw.Clamp {
margin-start: 8; maximum-size: 500;
margin-top: 8;
ListBox settings_listbox {
ListBox settings_listbox { styles [
styles [ "navigation-sidebar",
"navigation-sidebar", ]
] }
} }
} }
}; }
} };
}; };
icon-name: "preferences-system";
name: "settings";
title: _("Settings");
} }
Adw.ViewStackPage { Adw.ViewStackPage {
child: Box {};
icon-name: "preferences-system"; icon-name: "preferences-system";
name: "shop"; name: "shop";
title: _("Shop"); title: _("Shop");
child: Box {};
} }
} }
[bottom] [bottom]
Adw.ViewSwitcherBar switcher_bar { Adw.ViewSwitcherBar switcher_bar {
reveal: true;
stack: main_stack; stack: main_stack;
} }
}; };
default-height: 600;
default-width: 800;
title: _("TuneIt");
} }
menu primary_menu { menu primary_menu {
...@@ -110,4 +142,3 @@ menu primary_menu { ...@@ -110,4 +142,3 @@ menu primary_menu {
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment