aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/call_window/call_window.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2022-02-12 12:54:48 +0100
committerMarvin W <git@larma.de>2022-02-12 14:36:25 +0100
commit0f5f57888e2e237549b1bc7002770ec102ff0e6b (patch)
tree7e95ea3bc079804b13e6cddbec32710242b6ef3b /main/src/ui/call_window/call_window.vala
parentbe751a5dda6e4b4612276d278f59f9f96ed0298c (diff)
downloaddino-0f5f57888e2e237549b1bc7002770ec102ff0e6b.tar.gz
dino-0f5f57888e2e237549b1bc7002770ec102ff0e6b.zip
Calls: Use GtkHeaderBar for each participant
Diffstat (limited to 'main/src/ui/call_window/call_window.vala')
-rw-r--r--main/src/ui/call_window/call_window.vala17
1 files changed, 5 insertions, 12 deletions
diff --git a/main/src/ui/call_window/call_window.vala b/main/src/ui/call_window/call_window.vala
index cf9ca0e6..ab969597 100644
--- a/main/src/ui/call_window/call_window.vala
+++ b/main/src/ui/call_window/call_window.vala
@@ -15,11 +15,9 @@ namespace Dino.Ui {
public Grid grid = new Grid() { visible=true };
public CallBottomBar bottom_bar = new CallBottomBar() { visible=true };
public Revealer bottom_bar_revealer = new Revealer() { valign=Align.END, transition_type=RevealerTransitionType.CROSSFADE, transition_duration=200, visible=true };
- public HeaderBar header_bar = new HeaderBar() { valign=Align.START, halign=Align.END, show_close_button=true, visible=true };
- public Revealer header_bar_revealer = new Revealer() { halign=Align.END, valign=Align.START, transition_type=RevealerTransitionType.CROSSFADE, transition_duration=200, visible=true };
+ public HeaderBar header_bar = new HeaderBar() { valign=Align.START, halign=Align.END, show_close_button=true, visible=true, opacity=0.0 };
+ public Revealer header_bar_revealer = new Revealer() { halign=Align.END, valign=Align.START, transition_type=RevealerTransitionType.SLIDE_LEFT, transition_duration=200, visible=true, reveal_child=false };
public Box own_video_box = new Box(Orientation.HORIZONTAL, 0) { halign=Align.END, valign=Align.END, visible=true };
- public Revealer invite_button_revealer = new Revealer() { margin_top=50, margin_right=30, halign=Align.END, valign=Align.START, transition_type=RevealerTransitionType.CROSSFADE, transition_duration=200 };
- public Button invite_button = new Button.from_icon_name("dino-account-plus") { relief=ReliefStyle.NONE, visible=true };
private Widget? own_video = null;
private HashMap<string, ParticipantWidget> participant_widgets = new HashMap<string, ParticipantWidget>();
private ArrayList<string> participants = new ArrayList<string>();
@@ -32,12 +30,11 @@ namespace Dino.Ui {
public bool controls_active { get; set; default=true; }
construct {
- Util.force_css(header_bar, "* { background: none; border: 0; border-radius: 0; }");
header_bar.get_style_context().add_class("call-header-bar");
+ header_bar.custom_title = new Box(Orientation.VERTICAL, 0);
+ header_bar.spacing = 0;
header_bar_revealer.add(header_bar);
bottom_bar_revealer.add(bottom_bar);
- invite_button.get_style_context().add_class("black-element");
- invite_button_revealer.add(invite_button);
own_video_box.get_style_context().add_class("own-video");
this.get_style_context().add_class("dino-call-window");
@@ -46,7 +43,6 @@ namespace Dino.Ui {
overlay.add_overlay(own_video_box);
overlay.add_overlay(bottom_bar_revealer);
overlay.add_overlay(header_bar_revealer);
- overlay.add_overlay(invite_button_revealer);
overlay.get_child_position.connect(on_get_child_position);
add(overlay);
@@ -54,8 +50,6 @@ namespace Dino.Ui {
public CallWindow() {
this.bind_property("controls-active", bottom_bar_revealer, "reveal-child", BindingFlags.SYNC_CREATE);
- this.bind_property("controls-active", header_bar_revealer, "reveal-child", BindingFlags.SYNC_CREATE);
- this.bind_property("controls-active", invite_button_revealer, "reveal-child", BindingFlags.SYNC_CREATE);
this.motion_notify_event.connect(reveal_control_elements);
this.enter_notify_event.connect(reveal_control_elements);
@@ -125,8 +119,7 @@ namespace Dino.Ui {
participant_widgets[participants[0]].margin_bottom = margin_bottom;
participant_widgets[participants[0]].margin_start = margin_left;
- participant_widgets[participants[0]].on_lowest_row_changed(margin_bottom == 0);
- participant_widgets[participants[0]].on_highest_row_changed(margin_top == 0);
+ participant_widgets[participants[0]].on_row_changed(margin_top == 0, margin_bottom == 0, margin_left == 0, margin_right == 0);
return;
}