Skip to content

Commit

Permalink
Allow for type to search (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
nokyan committed Jan 24, 2025
1 parent 50fade0 commit 5e435b0
Show file tree
Hide file tree
Showing 7 changed files with 246 additions and 281 deletions.
103 changes: 35 additions & 68 deletions data/resources/ui/pages/applications.ui
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@
</object>
<property name="child">
<object class="AdwToolbarView">
<child type="top">
<object class="GtkSearchBar" id="search_bar">
<property name="child">
<object class="GtkSearchEntry" id="search_entry">
<accessibility>
<property name="label" translatable="yes">Search applications</property>
</accessibility>
</object>
</property>
</object>
</child>
<property name="content">
<object class="AdwToastOverlay" id="toast_overlay">
<child>
Expand All @@ -62,78 +73,34 @@
</property>
<child type="bottom">
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="margin-top">16</property>
<property name="margin-bottom">16</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="hexpand">true</property>
<property name="spacing">16</property>
<property name="halign">end</property>
<child>
<object class="GtkRevealer" id="search_revealer">
<property name="transition_type">slide-up</property>
<child>
<object class="AdwClamp">
<property name="margin-top">16</property>
<property name="margin-bottom">0</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="tightening-threshold">300</property>
<property name="maximum-size">400</property>
<child>
<object class="GtkSearchEntry" id="search_entry">
<accessibility>
<property name="label" translatable="yes">Search applications</property>
</accessibility>
</object>
</child>
</object>
</child>
<object class="GtkButton" id="information_button">
<property name="icon-name">info-symbolic</property>
<property name="sensitive">false</property>
<property name="tooltip-text" translatable="yes">Show App Information</property>
<accessibility>
<property name="label" translatable="yes">Show App Information</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkBox">
<property name="margin-top">16</property>
<property name="margin-bottom">16</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="spacing">16</property>
<child>
<object class="GtkToggleButton" id="search_button">
<property name="icon-name">search-symbolic</property>
<property name="tooltip-text" translatable="yes">Search</property>
<accessibility>
<property name="label" translatable="yes">Toggle search field</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkBox">
<property name="hexpand">true</property>
<property name="spacing">16</property>
<property name="halign">end</property>
<child>
<object class="GtkButton" id="information_button">
<property name="icon-name">info-symbolic</property>
<property name="sensitive">false</property>
<property name="tooltip-text" translatable="yes">Show App Information</property>
<accessibility>
<property name="label" translatable="yes">Show App Information</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="AdwSplitButton" id="end_application_button">
<property name="label" translatable="yes">End App</property>
<property name="menu-model">end_app_menu</property>
<property name="sensitive">false</property>
<style>
<class name="destructive-action"/>
</style>
</object>
</child>
</object>
</child>
<object class="AdwSplitButton" id="end_application_button">
<property name="label" translatable="yes">End App</property>
<property name="menu-model">end_app_menu</property>
<property name="sensitive">false</property>
<style>
<class name="destructive-action"/>
</style>
</object>
</child>
</object>
Expand Down
129 changes: 48 additions & 81 deletions data/resources/ui/pages/processes.ui
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@
</object>
<property name="child">
<object class="AdwToolbarView">
<child type="top">
<object class="GtkSearchBar" id="search_bar">
<property name="child">
<object class="GtkSearchEntry" id="search_entry">
<accessibility>
<property name="label" translatable="yes">Search processes</property>
</accessibility>
</object>
</property>
</object>
</child>
<property name="content">
<object class="AdwToastOverlay" id="toast_overlay">
<child>
Expand All @@ -108,91 +119,47 @@
</property>
<child type="bottom">
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="margin-top">16</property>
<property name="margin-bottom">16</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="hexpand">true</property>
<property name="spacing">16</property>
<property name="halign">end</property>
<child>
<object class="GtkButton" id="options_button">
<property name="icon-name">options-symbolic</property>
<property name="sensitive">false</property>
<property name="tooltip-text" translatable="yes">Show Process Options</property>
<accessibility>
<property name="label" translatable="yes">Show Process Options</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkRevealer" id="search_revealer">
<property name="transition_type">slide-up</property>
<child>
<object class="AdwClamp">
<property name="margin-top">16</property>
<property name="margin-bottom">0</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="tightening-threshold">300</property>
<property name="maximum-size">400</property>
<child>
<object class="GtkSearchEntry" id="search_entry">
<accessibility>
<property name="label" translatable="yes">Search processes</property>
</accessibility>
</object>
</child>
</object>
</child>
<object class="GtkButton" id="information_button">
<property name="icon-name">info-symbolic</property>
<property name="sensitive">false</property>
<property name="tooltip-text" translatable="yes">Show Process Information</property>
<accessibility>
<property name="label" translatable="yes">Show Process Information</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkBox">
<property name="margin-top">16</property>
<property name="margin-bottom">16</property>
<property name="margin-start">16</property>
<property name="margin-end">16</property>
<property name="spacing">16</property>
<child>
<object class="GtkToggleButton" id="search_button">
<property name="icon-name">search-symbolic</property>
<property name="tooltip-text" translatable="yes">Search</property>
<accessibility>
<property name="label" translatable="yes">Toggle search field</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkBox">
<property name="hexpand">true</property>
<property name="spacing">16</property>
<property name="halign">end</property>
<child>
<object class="GtkButton" id="options_button">
<property name="icon-name">options-symbolic</property>
<property name="sensitive">false</property>
<property name="tooltip-text" translatable="yes">Show Process Options</property>
<accessibility>
<property name="label" translatable="yes">Show Process Options</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="information_button">
<property name="icon-name">info-symbolic</property>
<property name="sensitive">false</property>
<property name="tooltip-text" translatable="yes">Show Process Information</property>
<accessibility>
<property name="label" translatable="yes">Show Process Information</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="AdwSplitButton" id="end_process_button">
<property name="label" translatable="yes">End Process</property>
<property name="menu-model">end_process_menu</property>
<property name="sensitive">false</property>
<style>
<class name="destructive-action"/>
</style>
</object>
</child>
</object>
</child>
<object class="AdwSplitButton" id="end_process_button">
<property name="label" translatable="yes">End Process</property>
<property name="menu-model">end_process_menu</property>
<property name="sensitive">false</property>
<style>
<class name="destructive-action"/>
</style>
</object>
</child>
</object>
Expand Down
22 changes: 20 additions & 2 deletions data/resources/ui/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<property name="vexpand">True</property>
<property name="vhomogeneous">False</property>
<child>
<object class="GtkStackPage" id="applications_page">
<object class="GtkStackPage" id="apps_page">
<property name="title" translatable="yes">Apps</property>
<property name="child">
<object class="AdwToolbarView">
Expand All @@ -82,10 +82,19 @@
<property name="active" bind-source="split_view" bind-property="show-sidebar" bind-flags="sync-create|bidirectional"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="apps_search_button">
<property name="icon-name">search-symbolic</property>
<property name="tooltip-text" translatable="yes">Search</property>
<accessibility>
<property name="label" translatable="yes">Toggle search field</property>
</accessibility>
</object>
</child>
</object>
</child>
<property name="content">
<object class="ResApplications" id="applications"/>
<object class="ResApplications" id="apps"/>
</property>
</object>
</property>
Expand Down Expand Up @@ -113,6 +122,15 @@
<property name="active" bind-source="split_view" bind-property="show-sidebar" bind-flags="sync-create|bidirectional"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="processes_search_button">
<property name="icon-name">search-symbolic</property>
<property name="tooltip-text" translatable="yes">Search</property>
<accessibility>
<property name="label" translatable="yes">Toggle search field</property>
</accessibility>
</object>
</child>
</object>
</child>
<property name="content">
Expand Down
Loading

0 comments on commit 5e435b0

Please sign in to comment.