mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 16:31:58 +02:00
Add controls background on fullscreen
This commit is contained in:
3
clapper_src/controls.js
vendored
3
clapper_src/controls.js
vendored
@@ -31,7 +31,8 @@ var Controls = GObject.registerClass({
|
|||||||
this.positionScale = new Gtk.Scale({
|
this.positionScale = new Gtk.Scale({
|
||||||
orientation: Gtk.Orientation.HORIZONTAL,
|
orientation: Gtk.Orientation.HORIZONTAL,
|
||||||
value_pos: Gtk.PositionType.LEFT,
|
value_pos: Gtk.PositionType.LEFT,
|
||||||
draw_value: false
|
draw_value: false,
|
||||||
|
hexpand: true,
|
||||||
});
|
});
|
||||||
this.positionScale.connect(
|
this.positionScale.connect(
|
||||||
'button-press-event', this._onPositionScaleButtonPressEvent.bind(this)
|
'button-press-event', this._onPositionScaleButtonPressEvent.bind(this)
|
||||||
|
@@ -30,7 +30,10 @@ class ClapperInterface extends Gtk.Grid
|
|||||||
transition_type: Gtk.RevealerTransitionType.SLIDE_UP,
|
transition_type: Gtk.RevealerTransitionType.SLIDE_UP,
|
||||||
valign: Gtk.Align.END,
|
valign: Gtk.Align.END,
|
||||||
});
|
});
|
||||||
|
this.revealerBox = new Gtk.Box();
|
||||||
|
this.revealerBox.get_style_context().add_class('background');
|
||||||
|
|
||||||
|
this.revealer.add(this.revealerBox);
|
||||||
this.attach(this.overlay, 0, 0, 1, 1);
|
this.attach(this.overlay, 0, 0, 1, 1);
|
||||||
this.attach(this.controls, 0, 1, 1, 1);
|
this.attach(this.controls, 0, 1, 1, 1);
|
||||||
}
|
}
|
||||||
@@ -78,18 +81,15 @@ class ClapperInterface extends Gtk.Grid
|
|||||||
setControlsOnVideo(isOnVideo)
|
setControlsOnVideo(isOnVideo)
|
||||||
{
|
{
|
||||||
if(isOnVideo && !this.controlsInVideo) {
|
if(isOnVideo && !this.controlsInVideo) {
|
||||||
this.remove_row(1);
|
this.remove(this.controls);
|
||||||
this.controls.margin = 8;
|
|
||||||
this.controls.margin_start = 10;
|
|
||||||
this.controls.margin_end = 10;
|
|
||||||
this.overlay.add_overlay(this.revealer);
|
this.overlay.add_overlay(this.revealer);
|
||||||
this.revealer.add(this.controls);
|
this.revealerBox.pack_start(this.controls, false, true, 0);
|
||||||
this.revealer.show();
|
this.revealer.show();
|
||||||
|
this.revealerBox.show();
|
||||||
}
|
}
|
||||||
else if(!isOnVideo && this.controlsInVideo) {
|
else if(!isOnVideo && this.controlsInVideo) {
|
||||||
this.revealer.remove(this.controls);
|
this.revealerBox.remove(this.controls);
|
||||||
this.overlay.remove(this.revealer);
|
this.overlay.remove(this.revealer);
|
||||||
this.controls.margin = 4;
|
|
||||||
this.attach(this.controls, 0, 1, 1, 1);
|
this.attach(this.controls, 0, 1, 1, 1);
|
||||||
this.controls.show();
|
this.controls.show();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user