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,25 +39,32 @@ template $TuneitWindow: Adw.ApplicationWindow { ...@@ -25,25 +39,32 @@ 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";
title: _("Settings");
child: Adw.NavigationSplitView settings_split_view {
hexpand: true; hexpand: true;
content: Adw.NavigationPage { content: Adw.NavigationPage {
title: bind settings_pagestack.visible-child-name;
Adw.ToolbarView { Adw.ToolbarView {
reveal-top-bars: bind main_toolbar.reveal-top-bars inverted;
[top] [top]
Adw.HeaderBar settinga_content_bar { Adw.HeaderBar header_bar2 {
decoration-layout: ""; [end]
visible: false; MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
primary: true;
tooltip-text: _("Main Menu");
}
} }
Stack settings_pagestack {} Stack settings_pagestack {}
...@@ -51,11 +72,28 @@ template $TuneitWindow: Adw.ApplicationWindow { ...@@ -51,11 +72,28 @@ template $TuneitWindow: Adw.ApplicationWindow {
}; };
sidebar: Adw.NavigationPage { sidebar: Adw.NavigationPage {
Adw.ClampScrollable { title: _("Sections");
margin-bottom: 8;
margin-end: 8; Adw.ToolbarView {
margin-start: 8; reveal-top-bars: bind main_toolbar.reveal-top-bars inverted;
margin-top: 8;
[top]
Adw.HeaderBar {
[end]
MenuButton {
icon-name: "open-menu-symbolic";
menu-model: primary_menu;
primary: true;
tooltip-text: _("Main Menu");
}
}
ScrolledWindow {
propagate-natural-height: true;
hscrollbar-policy: never;
Adw.Clamp {
maximum-size: 500;
ListBox settings_listbox { ListBox settings_listbox {
styles [ styles [
...@@ -63,33 +101,27 @@ template $TuneitWindow: Adw.ApplicationWindow { ...@@ -63,33 +101,27 @@ template $TuneitWindow: Adw.ApplicationWindow {
] ]
} }
} }
}; }
} }
}; };
};
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