forked from MrBesen/lolautoaccept
layouting problems fixed
This commit is contained in:
parent
99858e7fae
commit
1f4f4b52bc
|
@ -21,6 +21,7 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent* event) override;
|
||||
virtual void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void toggleMainswitch(bool);
|
||||
|
|
|
@ -23,6 +23,8 @@ MainWindow::MainWindow(LolAutoAccept& lolaa, QWidget *parent) : QMainWindow(pare
|
|||
applySetting(rc.prepick, ui->prepickstage);
|
||||
applySetting(rc.ban, ui->banstage);
|
||||
applySetting(rc.pick, ui->pickstage);
|
||||
|
||||
resizeEvent(nullptr);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
|
@ -36,8 +38,15 @@ void MainWindow::closeEvent([[maybe_unused]] QCloseEvent* event) {
|
|||
conf.save();
|
||||
}
|
||||
|
||||
void MainWindow::resizeEvent([[maybe_unused]] QResizeEvent *event) {
|
||||
ui->verticalLayoutWidget->setMinimumSize(ui->centralwidget->size());
|
||||
ui->verticalLayoutWidget->setMaximumSize(ui->centralwidget->size());
|
||||
ui->verticalLayoutWidget->setMinimumSize(ui->centralwidget->size());
|
||||
}
|
||||
|
||||
void MainWindow::toggleMainswitch(bool state) {
|
||||
Log::info << "mainswitch toggled: " << state;
|
||||
|
||||
if(state) {
|
||||
if(!lolaa.init()) {
|
||||
Log::error << "League Client not found!";
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
StageSettings::StageSettings(QWidget *parent) : QWidget(parent), ui(new Ui::StageSettings) {
|
||||
ui->setupUi(this);
|
||||
setMinimumSize(ui->gridLayout->minimumSize());
|
||||
}
|
||||
|
||||
StageSettings::~StageSettings() {
|
||||
|
|
|
@ -6,16 +6,22 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>635</height>
|
||||
<width>432</width>
|
||||
<height>630</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>LoL-Auto-Accept</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -23,13 +29,16 @@
|
|||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>381</width>
|
||||
<height>491</height>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>431</width>
|
||||
<height>581</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mainswitch">
|
||||
<property name="text">
|
||||
|
@ -50,14 +59,14 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<width>100</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -72,14 +81,14 @@
|
|||
<item>
|
||||
<widget class="StageSettings" name="banstage" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<width>100</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -94,14 +103,14 @@
|
|||
<item>
|
||||
<widget class="StageSettings" name="pickstage" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<width>100</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
|
@ -121,7 +130,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<width>432</width>
|
||||
<height>24</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -152,8 +161,8 @@
|
|||
<slot>aatoggled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>17</x>
|
||||
<y>258</y>
|
||||
<x>18</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>393</x>
|
||||
|
@ -168,8 +177,8 @@
|
|||
<slot>pptoggled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>252</x>
|
||||
<y>338</y>
|
||||
<x>253</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>296</x>
|
||||
|
@ -200,8 +209,8 @@
|
|||
<slot>toggleMainswitch(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>86</x>
|
||||
<y>163</y>
|
||||
<x>87</x>
|
||||
<y>49</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>1</x>
|
||||
|
@ -264,8 +273,8 @@
|
|||
<slot>ppedited()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>184</x>
|
||||
<y>335</y>
|
||||
<x>185</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>122</x>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>762</width>
|
||||
<height>859</height>
|
||||
<width>412</width>
|
||||
<height>180</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -18,20 +18,23 @@
|
|||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>130</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>130</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="sizePolicy">
|
||||
|
@ -44,6 +47,9 @@
|
|||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
|
@ -53,8 +59,17 @@
|
|||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinAndMaxSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addChampion">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Add Champion</string>
|
||||
</property>
|
||||
|
@ -62,6 +77,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="removeChampion">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Remove Champion</string>
|
||||
</property>
|
||||
|
@ -72,15 +93,15 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QListWidget" name="championList">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>150</height>
|
||||
<width>128</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
|
@ -122,7 +143,7 @@
|
|||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>20</x>
|
||||
<y>296</y>
|
||||
<y>179</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
@ -133,12 +154,12 @@
|
|||
<slot>addChamp()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>739</x>
|
||||
<y>328</y>
|
||||
<x>389</x>
|
||||
<y>102</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>757</x>
|
||||
<y>291</y>
|
||||
<x>411</x>
|
||||
<y>179</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
@ -149,12 +170,12 @@
|
|||
<slot>removeChamp()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>739</x>
|
||||
<y>598</y>
|
||||
<x>389</x>
|
||||
<y>146</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>758</x>
|
||||
<y>697</y>
|
||||
<x>411</x>
|
||||
<y>179</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
|
|
Loading…
Reference in New Issue