Improve page titles.

This commit is contained in:
luxick
2017-08-11 23:19:35 +02:00
parent ecc2045282
commit 7bbfc843b0
6 changed files with 56 additions and 24 deletions

View File

@@ -247,7 +247,7 @@
</packing>
</child>
<child>
<object class="GtkLabel" id="searchTitle">
<object class="GtkLabel" id="lib_title">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">5</property>

View File

@@ -330,7 +330,37 @@
<child>
<object class="GtkBox" id="selectionToolsBox">
<property name="can_focus">False</property>
<property name="margin_left">2</property>
<property name="margin_right">2</property>
<property name="spacing">2</property>
<child>
<object class="GtkLabel" id="search_title_label">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes">Showing results for:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="search_title">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">2</property>
<property name="margin_right">2</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="addRemoveButton">
<property name="label" translatable="yes">Add to Library</property>
@@ -343,15 +373,10 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>

View File

@@ -112,23 +112,36 @@
<object class="GtkBox" id="wantsToolBar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">2</property>
<property name="margin_right">2</property>
<property name="spacing">2</property>
<child>
<object class="GtkLabel" id="wantsTileLabel">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Showing:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
<object class="GtkLabel" id="wants_title">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">2</property>
<property name="margin_right">2</property>
<attributes>
<attribute name="weight" value="semibold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>

View File

@@ -207,7 +207,7 @@ class LibraryHandlers:
card_tree.store.clear()
self.app.ui.get_object("noResults").set_visible(True)
self.app.ui.get_object("searchTitle").set_text(tag)
self.app.ui.get_object("lib_title").set_text(tag)
def lib_new_tag_and_add(self, item, cards):
response = self.app.show_name_enter_dialog("Enter name for new Tag", "")

View File

@@ -11,17 +11,12 @@ class SearchHandlers:
def __init__(self, app: 'application.Application'):
self.app = app
# set mana icons on filter buttons
buttons = [x for x in self.app.ui.get_object("manaFilterGrid").get_children()
if isinstance(x, Gtk.ToggleButton)]
self._init_mana_buttons(buttons)
# set auto completion for filter entry
self._init_set_entry(self.app.ui.get_object("setEntry"))
# Fill rarity box
self._init_combo_box(self.app.ui.get_object("rarityCombo"), util.rarity_dict.keys())
# Fill type box
self._init_combo_box(self.app.ui.get_object("typeCombo"), util.card_types)
# Create Model for search results
self._init_results_tree()
def do_search_cards(self, sender):
@@ -35,6 +30,8 @@ class SearchHandlers:
card_list.update(results)
self.app.ui.get_object("searchOverlay").set_visible(False)
self.app.ui.get_object("search_title_label").set_visible(True)
self.app.ui.get_object("search_title").set_text(search_term)
@staticmethod
def do_clear_mana_filter(mana_filter_grid):

View File

@@ -158,10 +158,7 @@ class WantsHandlers:
tree.store.clear()
self.app.ui.get_object("wantsOverlay").set_visible(True)
# Set Title
label = self.app.ui.get_object("wantsTileLabel") # type: Gtk.Label
label.set_markup("<big>" + str(selected_list) + "</big>")
self.app.ui.get_object("wants_title").set_text(str(selected_list))
def reload_wants_list(self, preserve=False):
tree = self.app.ui.get_object("wantsListsTree")