Set margin values on ui controls
This commit is contained in:
parent
d483040d76
commit
3c1e65792f
@ -73,6 +73,10 @@ void SettingsWindow::onSave()
|
||||
|
||||
configuration_->setScreenDPI(static_cast<size_t>(ui_->horizontalSliderScreenDPI->value()));
|
||||
configuration_->setOMXLayerIndex(ui_->spinBoxOmxLayerIndex->value());
|
||||
|
||||
QRect videoMargins(0, 0, ui_->spinBoxVideoMarginWidth->value(), ui_->spinBoxVideoMarginHeight->value());
|
||||
configuration_->setVideoMargins(std::move(videoMargins));
|
||||
|
||||
configuration_->setTouchscreenEnabled(ui_->checkBoxEnableTouchscreen->isChecked());
|
||||
this->saveButtonCheckBoxes();
|
||||
|
||||
@ -130,6 +134,10 @@ void SettingsWindow::load()
|
||||
ui_->horizontalSliderScreenDPI->setValue(static_cast<int>(configuration_->getScreenDPI()));
|
||||
ui_->spinBoxOmxLayerIndex->setValue(configuration_->getOMXLayerIndex());
|
||||
|
||||
const auto& videoMargins = configuration_->getVideoMargins();
|
||||
ui_->spinBoxVideoMarginWidth->setValue(videoMargins.width());
|
||||
ui_->spinBoxVideoMarginHeight->setValue(videoMargins.height());
|
||||
|
||||
ui_->checkBoxEnableTouchscreen->setChecked(configuration_->getTouchscreenEnabled());
|
||||
this->loadButtonCheckBoxes();
|
||||
|
||||
|
@ -343,6 +343,9 @@ color: rgb(238, 238, 236);</string>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="labelVideoMarginHeight">
|
||||
<property name="geometry">
|
||||
@ -366,6 +369,9 @@ color: rgb(238, 238, 236);</string>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBoxScreenDPI">
|
||||
|
Loading…
x
Reference in New Issue
Block a user