Fixed toggle button ui updates
This commit is contained in:
parent
41a8d18c01
commit
b302465322
@ -30,7 +30,6 @@
|
||||
<property name="width-request">800</property>
|
||||
<property name="height-request">600</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="title" translatable="yes">PyFM</property>
|
||||
<property name="window-position">center</property>
|
||||
<property name="default-width">1200</property>
|
||||
<property name="default-height">720</property>
|
||||
@ -211,7 +210,7 @@
|
||||
<property name="spacing">5</property>
|
||||
<property name="layout-style">start</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="tggl_notebook_1">
|
||||
<object class="GtkToggleButton" id="tggl_notebook_1">
|
||||
<property name="name">tggl_notebook_1</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
@ -227,7 +226,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="tggl_notebook_2">
|
||||
<object class="GtkToggleButton" id="tggl_notebook_2">
|
||||
<property name="name">tggl_notebook_2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
@ -243,7 +242,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="tggl_notebook_3">
|
||||
<object class="GtkToggleButton" id="tggl_notebook_3">
|
||||
<property name="name">tggl_notebook_3</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
@ -259,7 +258,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="tggl_notebook_4">
|
||||
<object class="GtkToggleButton" id="tggl_notebook_4">
|
||||
<property name="name">tggl_notebook_4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
|
@ -1,34 +1,35 @@
|
||||
/* Set fm to have transparent window */
|
||||
|
||||
* {
|
||||
/* * {
|
||||
background: rgba(0, 0, 0, 0.14);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
* selection {
|
||||
background-color: rgba(116, 0, 0, 0.65);
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
background-color: rgba(116, 0, 0, 0.65);
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
|
||||
.view:selected,
|
||||
.view:selected:hover {
|
||||
box-shadow: inset 0 0 0 9999px rgba(15, 134, 13, 0.49);
|
||||
color: rgba(255, 255, 255, 0.5);;
|
||||
}
|
||||
box-shadow: inset 0 0 0 9999px rgba(15, 134, 13, 0.49);
|
||||
color: rgba(255, 255, 255, 0.5);;
|
||||
} */
|
||||
|
||||
|
||||
/* Rubberband coloring */
|
||||
.rubberband,
|
||||
/* .rubberband,
|
||||
rubberband,
|
||||
flowbox rubberband,
|
||||
treeview.view rubberband,
|
||||
.content-view rubberband,
|
||||
.content-view .rubberband,
|
||||
XfdesktopIconView.view .rubberband {
|
||||
border: 1px solid #6c6c6c;
|
||||
background-color: rgba(21, 158, 167, 0.57);
|
||||
border: 1px solid #6c6c6c;
|
||||
background-color: rgba(21, 158, 167, 0.57);
|
||||
}
|
||||
|
||||
XfdesktopIconView.view:active {
|
||||
background-color: rgba(172, 102, 21, 1);
|
||||
}
|
||||
background-color: rgba(172, 102, 21, 1);
|
||||
} */
|
||||
|
@ -69,6 +69,7 @@ class Signals(WindowMixin, PaneMixin):
|
||||
object = self.builder.get_object(f"tggl_notebook_{i}")
|
||||
views = value[0]["window"]["views"]
|
||||
self.window_controller.create_window()
|
||||
object.set_active(True)
|
||||
|
||||
for view in views:
|
||||
self.create_new_view_notebook(None, view, i)
|
||||
|
@ -12,17 +12,22 @@ class PaneMixin:
|
||||
child.show()
|
||||
|
||||
def run_flag_toggle(self, pane_index):
|
||||
tggl_button = self.builder.get_object(f"tggl_notebook_{pane_index}")
|
||||
if pane_index == 1:
|
||||
self.is_pane1_hidden = not self.is_pane1_hidden
|
||||
tggl_button.set_active(not self.is_pane1_hidden)
|
||||
return self.is_pane1_hidden
|
||||
elif pane_index == 2:
|
||||
self.is_pane2_hidden = not self.is_pane2_hidden
|
||||
tggl_button.set_active(not self.is_pane2_hidden)
|
||||
return self.is_pane2_hidden
|
||||
elif pane_index == 3:
|
||||
self.is_pane3_hidden = not self.is_pane3_hidden
|
||||
tggl_button.set_active(not self.is_pane3_hidden)
|
||||
return self.is_pane3_hidden
|
||||
elif pane_index == 4:
|
||||
self.is_pane4_hidden = not self.is_pane4_hidden
|
||||
tggl_button.set_active(not self.is_pane4_hidden)
|
||||
return self.is_pane4_hidden
|
||||
|
||||
def toggle_notebook_pane(self, widget, eve=None):
|
||||
|
@ -26,7 +26,7 @@ class Settings:
|
||||
# Get window and connect signals
|
||||
window = self.builder.get_object("Main_Window")
|
||||
window.connect("delete-event", gtk.main_quit)
|
||||
self.setWindowData(window, False)
|
||||
self.setWindowData(window, True)
|
||||
return window
|
||||
|
||||
def setWindowData(self, window, paintable):
|
||||
|
Loading…
Reference in New Issue
Block a user