Skip to content

Commit

Permalink
Small UI tweaks for headerbar
Browse files Browse the repository at this point in the history
  • Loading branch information
hugolabe committed Dec 5, 2023
1 parent c8e0db7 commit 5a436e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion data/ui/search.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
<child>
<object class="GtkSearchEntry" id="search_entry">
<property name="placeholder-text" translatable="yes">Search Wikipedia</property>
<property name="hexpand">true</property>
</object>
</child>
<child>
Expand Down
6 changes: 4 additions & 2 deletions src/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def set_mobile(self, mobile_layout):
self.tabs_button.set_visible(True)
self.flap_button.set_visible(False)
self.view_button.set_visible(False)
self.search_box.set_size_request(-1, -1)
self.search_box.search_entry.set_hexpand(True)
self.search_box.search_entry.set_size_request(-1, -1)
view_menu_popover = self.view_button.get_popover()
if view_menu_popover:
self.view_button.set_popover(None)
Expand All @@ -68,7 +69,8 @@ def set_mobile(self, mobile_layout):
self.tabs_button.set_visible(False)
self.flap_button.set_visible(True)
self.view_button.set_visible(True)
self.search_box.set_size_request(320, -1)
self.search_box.search_entry.set_hexpand(False)
self.search_box.search_entry.set_size_request(280, -1)
view_menu_popover = self._actionbar.view_button.get_popover()
if view_menu_popover:
self._actionbar.view_button.set_popover(None)
Expand Down

0 comments on commit 5a436e6

Please sign in to comment.