You need to sign in or sign up before continuing.
window.blp 2.31 KB
Newer Older
Roman Alifanov's avatar
Roman Alifanov committed
1 2 3 4
using Gtk 4.0;
using Adw 1;

template $TuneitWindow: Adw.ApplicationWindow {
5 6 7 8 9 10 11 12 13 14 15 16 17 18
  Adw.Breakpoint {
    condition ("max-width: 400sp")

    setters {
      header_bar.title-widget: null;
      main_toolbar.top-bar-style: flat;
      settinga_content_bar.visible: true;
      switcher_bar.reveal: true;
      settings_split_view.collapsed: true;
    }
  }
  content: Adw.ToolbarView main_toolbar{
    top-bar-style: raised_border;

Roman Alifanov's avatar
Roman Alifanov committed
19
    [top]
20
    Adw.HeaderBar header_bar {
Roman Alifanov's avatar
Roman Alifanov committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
      [end]
      MenuButton {
        icon-name: "open-menu-symbolic";
        menu-model: primary_menu;
        primary: true;
        tooltip-text: _("Main Menu");
      }

      [title]
      Adw.ViewSwitcher {
        policy: wide;
        stack: main_stack;
      }
    }

    Adw.ViewStack main_stack {
      Adw.ViewStackPage {
        child: Box {
39
          Adw.NavigationSplitView settings_split_view {
Roman Alifanov's avatar
Roman Alifanov committed
40
            hexpand: true;
41 42 43 44 45 46 47
            content: Adw.NavigationPage {
              Adw.ToolbarView {
                [top]
                Adw.HeaderBar settinga_content_bar {
                  decoration-layout: "";
                  visible: false;
                }
Roman Alifanov's avatar
Roman Alifanov committed
48

49 50 51 52
                Stack settings_pagestack {}
              }
            };
            
Roman Alifanov's avatar
Roman Alifanov committed
53 54 55 56 57 58 59
            sidebar: Adw.NavigationPage {
              Adw.ClampScrollable {
                margin-bottom: 8;
                margin-end: 8;
                margin-start: 8;
                margin-top: 8;

60 61 62 63
                ListBox settings_listbox {
                  styles [
                    "navigation-sidebar",
                  ]
Roman Alifanov's avatar
Roman Alifanov committed
64 65 66 67 68 69 70
                }
              }
            };
          }
        };

        icon-name: "preferences-system";
Roman Alifanov's avatar
Roman Alifanov committed
71 72 73 74 75 76 77 78 79
        name: "settings";
        title: _("Settings");
      }

      Adw.ViewStackPage {
        child: Box {};
        icon-name: "preferences-system";
        name: "shop";
        title: _("Shop");
Roman Alifanov's avatar
Roman Alifanov committed
80 81
      }
    }
82 83 84 85 86 87

    [bottom]
    Adw.ViewSwitcherBar switcher_bar {
      stack: main_stack;
    }

Roman Alifanov's avatar
Roman Alifanov committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
  };

  default-height: 600;
  default-width: 800;
  title: _("TuneIt");
}

menu primary_menu {
  section {
    item {
      action: "app.preferences";
      label: _("_Preferences");
    }

    item {
      action: "win.show-help-overlay";
      label: _("_Keyboard Shortcuts");
    }

    item {
      action: "app.about";
      label: _("_About TuneIt");
    }
  }
}