generated from itdominator/Python-With-Gtk-Template
Bug fix for master sink, cleanup
This commit is contained in:
parent
572041a2a3
commit
c8d6a6b563
|
@ -26,6 +26,9 @@ class SinkInputList(Gtk.ScrolledWindow):
|
||||||
|
|
||||||
|
|
||||||
def _setup_styling(self):
|
def _setup_styling(self):
|
||||||
|
ctx = self.get_style_context()
|
||||||
|
ctx.add_class("sink-list-container")
|
||||||
|
|
||||||
self.set_vexpand(True)
|
self.set_vexpand(True)
|
||||||
self.set_overlay_scrolling(False)
|
self.set_overlay_scrolling(False)
|
||||||
self.set_margin_top(20)
|
self.set_margin_top(20)
|
||||||
|
|
|
@ -35,6 +35,8 @@ class AudioSink(Gtk.Box):
|
||||||
self.set_orientation(Gtk.Orientation.VERTICAL)
|
self.set_orientation(Gtk.Orientation.VERTICAL)
|
||||||
self.set_margin_top(10)
|
self.set_margin_top(10)
|
||||||
self.set_margin_bottom(10)
|
self.set_margin_bottom(10)
|
||||||
|
self.set_margin_left(10)
|
||||||
|
self.set_margin_right(10)
|
||||||
|
|
||||||
def _setup_signals(self):
|
def _setup_signals(self):
|
||||||
...
|
...
|
||||||
|
@ -77,10 +79,8 @@ class AudioSink(Gtk.Box):
|
||||||
box.add(mute_btn)
|
box.add(mute_btn)
|
||||||
self.add(box)
|
self.add(box)
|
||||||
|
|
||||||
|
|
||||||
def set_volume(self, range):
|
def set_volume(self, range):
|
||||||
if self.block_update:
|
if self.block_update: return
|
||||||
return
|
|
||||||
|
|
||||||
value = range.get_value() / 100
|
value = range.get_value() / 100
|
||||||
sink_vol_info = self.sink.volume
|
sink_vol_info = self.sink.volume
|
||||||
|
@ -90,7 +90,10 @@ class AudioSink(Gtk.Box):
|
||||||
new_level.append(value)
|
new_level.append(value)
|
||||||
|
|
||||||
sink_vol_info.values = new_level
|
sink_vol_info.values = new_level
|
||||||
|
try:
|
||||||
self.pulse.sink_input_volume_set(self.sink.index, sink_vol_info)
|
self.pulse.sink_input_volume_set(self.sink.index, sink_vol_info)
|
||||||
|
except Exception as e:
|
||||||
|
self.pulse.sink_volume_set(self.sink.index, sink_vol_info)
|
||||||
|
|
||||||
def toggle_mute(self, widget = None, eve = None):
|
def toggle_mute(self, widget = None, eve = None):
|
||||||
self.muted = not self.muted
|
self.muted = not self.muted
|
||||||
|
@ -98,10 +101,7 @@ class AudioSink(Gtk.Box):
|
||||||
self.pulse.sink_input_mute(self.sink.index, mute=self.muted)
|
self.pulse.sink_input_mute(self.sink.index, mute=self.muted)
|
||||||
|
|
||||||
def set_mute_image(self, mute_btn):
|
def set_mute_image(self, mute_btn):
|
||||||
if self.muted:
|
mute_btn.set_image( Gtk.Image.new_from_icon_name( "gtk-disconnect" if self.muted else "gtk-connect" , 3) )
|
||||||
mute_btn.set_image( Gtk.Image.new_from_icon_name("gtk-disconnect", 3) )
|
|
||||||
else:
|
|
||||||
mute_btn.set_image( Gtk.Image.new_from_icon_name("gtk-connect", 3) )
|
|
||||||
|
|
||||||
def do_update(self):
|
def do_update(self):
|
||||||
self.block_update = True
|
self.block_update = True
|
||||||
|
|
|
@ -1,86 +1,13 @@
|
||||||
/* Set fm to have transparent window */
|
|
||||||
box,
|
|
||||||
iconview,
|
|
||||||
notebook,
|
|
||||||
paned,
|
|
||||||
stack,
|
|
||||||
scrolledwindow,
|
|
||||||
treeview.view,
|
|
||||||
.content-view,
|
|
||||||
.view {
|
|
||||||
background: rgba(19, 21, 25, 0.14);
|
|
||||||
color: rgba(255, 255, 255, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
notebook > header > tabs > tab:checked {
|
|
||||||
/* Neon Blue 00e8ff */
|
|
||||||
background-color: rgba(0, 232, 255, 0.2);
|
|
||||||
/* Dark Bergundy */
|
|
||||||
/* background-color: rgba(116, 0, 0, 0.25); */
|
|
||||||
|
|
||||||
color: rgba(255, 255, 255, 0.8);
|
|
||||||
}
|
|
||||||
|
|
||||||
#message_view {
|
|
||||||
font: 16px "Monospace";
|
|
||||||
}
|
|
||||||
|
|
||||||
.view:selected,
|
|
||||||
.view:selected:hover {
|
|
||||||
box-shadow: inset 0 0 0 9999px rgba(21, 158, 167, 0.34);
|
|
||||||
color: rgba(255, 255, 255, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.alert-border {
|
|
||||||
border: 2px solid rgba(116, 0, 0, 0.64);
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-border {
|
|
||||||
border: 2px solid rgba(136, 204, 39, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.notebook-selected-focus {
|
|
||||||
/* Neon Blue 00e8ff border */
|
|
||||||
border: 2px solid rgba(0, 232, 255, 0.34);
|
|
||||||
/* Dark Bergundy */
|
|
||||||
/* border: 2px solid rgba(116, 0, 0, 0.64); */
|
|
||||||
}
|
|
||||||
|
|
||||||
.notebook-unselected-focus {
|
|
||||||
/* Neon Blue 00e8ff border */
|
|
||||||
/* border: 2px solid rgba(0, 232, 255, 0.25); */
|
|
||||||
/* Dark Bergundy */
|
|
||||||
/* border: 2px solid rgba(116, 0, 0, 0.64); */
|
|
||||||
/* Snow White */
|
|
||||||
border: 2px solid rgba(255, 255, 255, 0.24);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* * {
|
/* * {
|
||||||
background: rgba(0, 0, 0, 0.14);
|
background: rgba(0, 0, 0, 0.14);
|
||||||
color: rgba(255, 255, 255, 1);
|
color: rgba(255, 255, 255, 1);
|
||||||
} */
|
} */
|
||||||
|
|
||||||
/* * selection {
|
.sink-list-container {
|
||||||
background-color: rgba(116, 0, 0, 0.65);
|
/* Neon Blue 00e8ff border */
|
||||||
color: rgba(255, 255, 255, 0.5);
|
/* border: 2px solid rgba(0, 232, 255, 0.25); */
|
||||||
} */
|
/* Dark Bergundy */
|
||||||
|
/* border: 2px solid rgba(116, 0, 0, 0.64); */
|
||||||
/* Rubberband coloring */
|
/* Snow White */
|
||||||
/* .rubberband,
|
border: 2px solid rgba(255, 255, 255, 0.34);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
XfdesktopIconView.view:active {
|
|
||||||
background-color: rgba(172, 102, 21, 1);
|
|
||||||
} */
|
|
||||||
|
|
Loading…
Reference in New Issue