mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-20 15:33:55 -05:00
Keep size of individual macro sgements consistent
Previously the segments would expand if there was still room in the condition and action area.
This commit is contained in:
@@ -832,7 +832,7 @@
|
||||
<height>218</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_35" stretch="10,1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_35" stretch="10,0,1">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||
</property>
|
||||
@@ -859,6 +859,9 @@
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="macroEditConditionLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
@@ -866,6 +869,19 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
@@ -931,7 +947,7 @@
|
||||
<height>218</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_33" stretch="10,1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_33" stretch="10,0,1">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||
</property>
|
||||
@@ -955,6 +971,9 @@
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="macroEditActionLayout">
|
||||
<property name="spacing">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||
</property>
|
||||
@@ -962,6 +981,19 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_21">
|
||||
<item>
|
||||
|
||||
@@ -59,9 +59,12 @@ MacroSegmentEdit::MacroSegmentEdit(bool verticalControls, QWidget *parent)
|
||||
"#segmentFrame { border-radius: 4px; background-color: rgba(0,0,0,50); }");
|
||||
_frame->setLayout(_highLightFrameLayout);
|
||||
// Set background transparent to avoid blocking highlight frame
|
||||
setStyleSheet("\
|
||||
QCheckBox { background-color: rgba(0,0,0,0); }\
|
||||
QLabel { background-color: rgba(0,0,0,0); }");
|
||||
setStyleSheet("QCheckBox { background-color: rgba(0,0,0,0); }\
|
||||
QLabel { background-color: rgba(0,0,0,0); }");
|
||||
|
||||
// Keep the size of macro segments consistent, even if there is room in
|
||||
// the edit areas
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
|
||||
QWidget::connect(_section, &Section::Collapsed, this,
|
||||
&MacroSegmentEdit::Collapsed);
|
||||
|
||||
Reference in New Issue
Block a user