gui changes: slider size now includes the textbox, combobox size now includes the droparrow, editor gui rearrangement
This commit is contained in:
@@ -246,17 +246,15 @@ void VideoWindow::ResizeLayout()
|
||||
if (!widget.IsVisible())
|
||||
return;
|
||||
const float margin_left = 80;
|
||||
const float margin_right = 40;
|
||||
widget.SetPos(XMFLOAT2(margin_left, y));
|
||||
widget.SetSize(XMFLOAT2(width - margin_left - margin_right, widget.GetScale().y));
|
||||
widget.SetSize(XMFLOAT2(width - margin_left - padding, widget.GetScale().y));
|
||||
y += widget.GetSize().y;
|
||||
y += padding;
|
||||
};
|
||||
auto add_right = [&](wi::gui::Widget& widget) {
|
||||
if (!widget.IsVisible())
|
||||
return;
|
||||
const float margin_right = 40;
|
||||
widget.SetPos(XMFLOAT2(width - margin_right - widget.GetSize().x, y));
|
||||
widget.SetPos(XMFLOAT2(width - padding - widget.GetSize().x, y));
|
||||
y += widget.GetSize().y;
|
||||
y += padding;
|
||||
};
|
||||
@@ -264,9 +262,8 @@ void VideoWindow::ResizeLayout()
|
||||
if (!widget.IsVisible())
|
||||
return;
|
||||
const float margin_left = padding;
|
||||
const float margin_right = padding;
|
||||
widget.SetPos(XMFLOAT2(margin_left, y));
|
||||
widget.SetSize(XMFLOAT2(width - margin_left - margin_right, widget.GetScale().y));
|
||||
widget.SetSize(XMFLOAT2(width - margin_left - padding, widget.GetScale().y));
|
||||
y += widget.GetSize().y;
|
||||
y += padding;
|
||||
};
|
||||
@@ -284,6 +281,7 @@ void VideoWindow::ResizeLayout()
|
||||
preview.SetSize(XMFLOAT2(preview.GetSize().x, preview.GetSize().x * h_aspect));
|
||||
|
||||
add(playpauseButton);
|
||||
playpauseButton.SetSize(XMFLOAT2(width - 140, playpauseButton.GetSize().y));
|
||||
loopedCheckbox.SetPos(XMFLOAT2(playpauseButton.GetPos().x - loopedCheckbox.GetSize().x - 2, playpauseButton.GetPos().y));
|
||||
stopButton.SetPos(XMFLOAT2(playpauseButton.GetPos().x + playpauseButton.GetSize().x + 2, playpauseButton.GetPos().y));
|
||||
stopButton.SetSize(XMFLOAT2(width - stopButton.GetPos().x - padding, playpauseButton.GetSize().y));
|
||||
|
||||
Reference in New Issue
Block a user