Merge pull request #182 from phidebian/phi-title-bottom
Add a 'title bar at bottom' option
This commit is contained in:
commit
eb81d3aeda
@ -101,6 +101,7 @@ DEFAULTS = {
|
||||
'use_custom_url_handler': False,
|
||||
'custom_url_handler' : '',
|
||||
'disable_real_transparency' : False,
|
||||
'title_at_bottom' : False,
|
||||
'title_hide_sizetext' : False,
|
||||
'title_transmit_fg_color' : '#ffffff',
|
||||
'title_transmit_bg_color' : '#c80003',
|
||||
|
@ -1333,6 +1333,22 @@
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="title_at_bottom_checkbutton">
|
||||
<property name="label" translatable="yes">Title bar at bottom (Require restart)</property>
|
||||
<property name="use_action_appearance">False</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="on_title_at_bottom_checkbutton_toggled" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="title_hide_sizetextcheck">
|
||||
<property name="label" translatable="yes">Hide size from title</property>
|
||||
|
@ -327,6 +327,11 @@ class PrefsEditor:
|
||||
#Hide size text from the title bar
|
||||
widget = guiget('title_hide_sizetextcheck')
|
||||
widget.set_active(self.config['title_hide_sizetext'])
|
||||
|
||||
# title bar at bottom
|
||||
widget = guiget('title_at_bottom_checkbutton')
|
||||
widget.set_active(self.config['title_at_bottom'])
|
||||
|
||||
#Always split with profile
|
||||
widget = guiget('always_split_with_profile')
|
||||
widget.set_active(self.config['always_split_with_profile'])
|
||||
@ -765,6 +770,11 @@ class PrefsEditor:
|
||||
self.config['title_hide_sizetext'] = widget.get_active()
|
||||
self.config.save()
|
||||
|
||||
def on_title_at_bottom_checkbutton_toggled(self, widget):
|
||||
"""Title at bottom setting changed"""
|
||||
self.config['title_at_bottom'] = widget.get_active()
|
||||
self.config.save()
|
||||
|
||||
def on_always_split_with_profile_toggled(self, widget):
|
||||
"""Always split with profile setting changed"""
|
||||
self.config['always_split_with_profile'] = widget.get_active()
|
||||
|
@ -163,8 +163,13 @@ class Terminal(Gtk.VBox):
|
||||
self.searchbar.connect('end-search', self.on_search_done)
|
||||
|
||||
self.show()
|
||||
self.pack_start(self.titlebar, False, True, 0)
|
||||
self.pack_start(self.terminalbox, True, True, 0)
|
||||
if self.config['title_at_bottom']:
|
||||
self.pack_start(self.terminalbox, True, True, 0)
|
||||
self.pack_start(self.titlebar, False, True, 0)
|
||||
else:
|
||||
self.pack_start(self.titlebar, False, True, 0)
|
||||
self.pack_start(self.terminalbox, True, True, 0)
|
||||
|
||||
self.pack_end(self.searchbar, True, True, 0)
|
||||
|
||||
self.connect_signals()
|
||||
|
Loading…
Reference in New Issue
Block a user