separator for joystick config

This commit is contained in:
sezanzeb 2020-12-20 00:47:01 +01:00 committed by sezanzeb
parent c1bb228bf4
commit f21e02ec25
3 changed files with 126 additions and 113 deletions

View File

@ -274,7 +274,6 @@
<property name="width-request">700</property>
<property name="can-focus">False</property>
<property name="title" translatable="yes">Key Mapper</property>
<property name="default-height">400</property>
<property name="icon-name">mouse</property>
<signal name="delete-event" handler="on_close" swapped="no"/>
<child>
@ -562,10 +561,29 @@
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSeparator" id="gamepad_separator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="gamepad_config">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="border-width">15</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
@ -698,13 +716,6 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>

View File

@ -158,8 +158,10 @@ class Window:
"""Set slider and dropdown values when a gamepad is selected."""
devices = get_devices()
if devices[self.selected_device]['gamepad']:
self.get('gamepad_separator').show()
self.get('gamepad_config').show()
else:
self.get('gamepad_separator').hide()
self.get('gamepad_config').hide()
return

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 48 KiB