This is a work-in-progress implementation of AdwTabBar/AdwTabView. Current issues: - Tab bar height is too large - Large gap on left side of header - Architecture needs refactoring: AdwTabView should contain per-tab UI widgets Next step: Properly refactor so each tab has its own complete UI widget tree.
362 lines
15 KiB
XML
362 lines
15 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<requires lib="gtk" version="4.0"/>
|
|
<requires lib="Adw" version="1.0"/>
|
|
|
|
<template class="RosterWindow" parent="AdwApplicationWindow">
|
|
<property name="default-width">1200</property>
|
|
<property name="default-height">800</property>
|
|
<property name="content">
|
|
<object class="GtkPaned" id="main_pane">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="position">300</property>
|
|
<property name="shrink-start-child">False</property>
|
|
<property name="resize-start-child">True</property>
|
|
<property name="shrink-end-child">False</property>
|
|
<property name="resize-end-child">True</property>
|
|
<property name="wide-handle">False</property>
|
|
|
|
<!-- LEFT: Sidebar Panel with its own header -->
|
|
<property name="start-child">
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
<property name="width-request">200</property>
|
|
|
|
<!-- Sidebar Header Bar -->
|
|
<child>
|
|
<object class="AdwHeaderBar">
|
|
<property name="show-title">False</property>
|
|
<property name="show-end-title-buttons">False</property>
|
|
<property name="show-start-title-buttons">False</property>
|
|
<child type="start">
|
|
<object class="GtkLabel">
|
|
<property name="label">Projects</property>
|
|
<style>
|
|
<class name="heading"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child type="end">
|
|
<object class="GtkButton" id="add_project_button">
|
|
<property name="icon-name">list-add-symbolic</property>
|
|
<property name="tooltip-text">Add Project</property>
|
|
<signal name="clicked" handler="on_add_project_clicked"/>
|
|
<style>
|
|
<class name="flat"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Sidebar Content -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
<property name="vexpand">True</property>
|
|
|
|
<!-- Projects List -->
|
|
<child>
|
|
<object class="GtkScrolledWindow">
|
|
<property name="vexpand">True</property>
|
|
<child>
|
|
<object class="GtkListBox" id="projects_listbox">
|
|
<style>
|
|
<class name="navigation-sidebar"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Save Current Request Button -->
|
|
<child>
|
|
<object class="GtkButton" id="save_request_button">
|
|
<property name="label">Save Current Request</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="margin-bottom">12</property>
|
|
<signal name="clicked" handler="on_save_request_clicked"/>
|
|
<style>
|
|
<class name="suggested-action"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
|
|
<!-- RIGHT: Main Content Panel with its own header -->
|
|
<property name="end-child">
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- AdwTabView (hidden - we use shared UI) -->
|
|
<child>
|
|
<object class="AdwTabView" id="tab_view">
|
|
<property name="visible">False</property>
|
|
<property name="vexpand">False</property>
|
|
<property name="height-request">0</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Main Header Bar -->
|
|
<child>
|
|
<object class="AdwHeaderBar">
|
|
<property name="show-start-title-buttons">False</property>
|
|
<property name="show-end-title-buttons">False</property>
|
|
|
|
<!-- Tab bar as title widget -->
|
|
<property name="title-widget">
|
|
<object class="AdwTabBar" id="tab_bar">
|
|
<property name="view">tab_view</property>
|
|
<property name="autohide">True</property>
|
|
<property name="expand-tabs">False</property>
|
|
</object>
|
|
</property>
|
|
|
|
<!-- Right side buttons -->
|
|
<child type="end">
|
|
<object class="GtkBox">
|
|
<property name="spacing">6</property>
|
|
|
|
<!-- New Request Button -->
|
|
<child>
|
|
<object class="GtkButton" id="new_request_button">
|
|
<property name="icon-name">list-add-symbolic</property>
|
|
<property name="tooltip-text">New Request (Ctrl+T)</property>
|
|
<style>
|
|
<class name="flat"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Main Menu -->
|
|
<child>
|
|
<object class="GtkMenuButton">
|
|
<property name="primary">True</property>
|
|
<property name="icon-name">open-menu-symbolic</property>
|
|
<property name="tooltip-text" translatable="yes">Main Menu</property>
|
|
<property name="menu-model">primary_menu</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Window Controls -->
|
|
<child>
|
|
<object class="GtkWindowControls">
|
|
<property name="side">end</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Main Content -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- URL Input Section -->
|
|
<child>
|
|
<object class="AdwClamp">
|
|
<property name="maximum-size">1000</property>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">12</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="margin-top">12</property>
|
|
<property name="margin-bottom">12</property>
|
|
|
|
<!-- Method Dropdown -->
|
|
<child>
|
|
<object class="GtkDropDown" id="method_dropdown">
|
|
<property name="enable-search">False</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- URL Entry -->
|
|
<child>
|
|
<object class="GtkEntry" id="url_entry">
|
|
<property name="placeholder-text">Enter URL...</property>
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Send Button -->
|
|
<child>
|
|
<object class="GtkButton" id="send_button">
|
|
<property name="label">Send</property>
|
|
<signal name="clicked" handler="on_send_clicked"/>
|
|
<style>
|
|
<class name="suggested-action"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Vertical Paned: Main Content | History Panel -->
|
|
<child>
|
|
<object class="GtkPaned" id="vertical_pane">
|
|
<property name="orientation">vertical</property>
|
|
<property name="vexpand">True</property>
|
|
<property name="position">600</property>
|
|
<property name="shrink-start-child">False</property>
|
|
<property name="shrink-end-child">True</property>
|
|
<property name="resize-start-child">True</property>
|
|
<property name="resize-end-child">True</property>
|
|
|
|
<!-- START: Request/Response Split -->
|
|
<property name="start-child">
|
|
<object class="GtkPaned" id="split_pane">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="position">600</property>
|
|
<property name="shrink-start-child">False</property>
|
|
<property name="shrink-end-child">False</property>
|
|
<property name="resize-start-child">True</property>
|
|
<property name="resize-end-child">True</property>
|
|
|
|
<!-- LEFT: Request Configuration -->
|
|
<property name="start-child">
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- Request Tabs Placeholder -->
|
|
<child>
|
|
<object class="GtkBox" id="request_tabs_container">
|
|
<property name="orientation">vertical</property>
|
|
<property name="vexpand">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
|
|
<!-- RIGHT: Response Display -->
|
|
<property name="end-child">
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- Response Tabs Placeholder -->
|
|
<child>
|
|
<object class="GtkBox" id="response_tabs_container">
|
|
<property name="orientation">vertical</property>
|
|
<property name="vexpand">True</property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Status Bar -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">12</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="margin-top">6</property>
|
|
<property name="margin-bottom">6</property>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="status_label">
|
|
<property name="label">Ready</property>
|
|
<style>
|
|
<class name="heading"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkLabel" id="time_label">
|
|
<property name="label"></property>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- Spacer -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="hexpand">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</property>
|
|
|
|
<!-- END: History Panel -->
|
|
<property name="end-child">
|
|
<object class="GtkBox">
|
|
<property name="orientation">vertical</property>
|
|
|
|
<!-- History Header -->
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">horizontal</property>
|
|
<property name="spacing">12</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="margin-top">6</property>
|
|
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label">Request History</property>
|
|
<property name="hexpand">True</property>
|
|
<property name="xalign">0</property>
|
|
<style>
|
|
<class name="heading"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<!-- History List -->
|
|
<child>
|
|
<object class="GtkScrolledWindow">
|
|
<property name="vexpand">True</property>
|
|
<property name="min-content-height">150</property>
|
|
|
|
<child>
|
|
<object class="GtkListBox" id="history_listbox">
|
|
<style>
|
|
<class name="boxed-list"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</property>
|
|
</template>
|
|
|
|
<menu id="primary_menu">
|
|
<section>
|
|
<item>
|
|
<attribute name="label" translatable="yes">_Preferences</attribute>
|
|
<attribute name="action">app.preferences</attribute>
|
|
</item>
|
|
<item>
|
|
<attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
|
|
<attribute name="action">app.shortcuts</attribute>
|
|
</item>
|
|
<item>
|
|
<attribute name="label" translatable="yes">_About Roster</attribute>
|
|
<attribute name="action">app.about</attribute>
|
|
</item>
|
|
</section>
|
|
</menu>
|
|
</interface>
|