mirror of
https://github.com/scorpion-26/gBar.git
synced 2024-11-22 03:02:49 +00:00
Add margin to Transform
This commit is contained in:
parent
342ff57ba7
commit
ba366729fe
2 changed files with 8 additions and 0 deletions
|
@ -173,6 +173,10 @@ void Widget::ApplyPropertiesToWidget()
|
|||
gtk_widget_set_valign(m_Widget, Utils::ToGtkAlign(m_VerticalTransform.alignment));
|
||||
gtk_widget_set_hexpand(m_Widget, m_HorizontalTransform.expand);
|
||||
gtk_widget_set_vexpand(m_Widget, m_VerticalTransform.expand);
|
||||
gtk_widget_set_margin_start(m_Widget, m_HorizontalTransform.marginBefore);
|
||||
gtk_widget_set_margin_end(m_Widget, m_HorizontalTransform.marginAfter);
|
||||
gtk_widget_set_margin_top(m_Widget, m_VerticalTransform.marginBefore);
|
||||
gtk_widget_set_margin_bottom(m_Widget, m_VerticalTransform.marginAfter);
|
||||
|
||||
if (m_OnCreate)
|
||||
m_OnCreate(*this);
|
||||
|
|
|
@ -18,6 +18,10 @@ struct Transform
|
|||
int size = -1;
|
||||
bool expand = true;
|
||||
Alignment alignment = Alignment::Fill;
|
||||
// Left/Top
|
||||
int marginBefore = 0;
|
||||
// Right/Bottom
|
||||
int marginAfter = 0;
|
||||
};
|
||||
|
||||
enum class Orientation
|
||||
|
|
Loading…
Reference in a new issue