Commit 207ba5ff authored by Niklas Freund's avatar Niklas Freund
Browse files

Enabled window resizing

parent 3f2dfcd2
......@@ -112,8 +112,6 @@ KCalculator::KCalculator(QWidget *parent)
updateGeometry();
layout()->setSizeConstraint(QLayout::SetFixedSize);
updateDisplay(UPDATE_FROM_CORE);
// clear history, otherwise we have a leading "0" in it
calc_history->clearHistory();
......@@ -688,7 +686,7 @@ void KCalculator::updateGeometry()
const auto leftPadList = leftPad->children();
for (QObject *obj : leftPadList) {
if (auto const button = qobject_cast<KCalcButton *>(obj)) {
button->setFixedWidth(em.width() * 4 + margin * 2);
button->setMinimumWidth(em.width() * 4 + margin * 2);
button->installEventFilter(this);
}
}
......@@ -699,7 +697,7 @@ void KCalculator::updateGeometry()
auto const button = qobject_cast<KCalcButton *>(obj);
// let Shift expand freely
if (button && button != pbShift) {
button->setFixedWidth(em.width() * 3 + margin * 2);
button->setMinimumWidth(em.width() * 3 + margin * 2);
button->installEventFilter(this);
}
}
......@@ -710,7 +708,7 @@ void KCalculator::updateGeometry()
if (auto const button = qobject_cast<KCalcButton *>(obj)) {
// let pb0 expand freely
if (button != pb0) {
button->setFixedWidth(em.width() * 3 + margin * 2);
button->setMinimumWidth(em.width() * 3 + margin * 2);
}
button->installEventFilter(this);
}
......
......@@ -28,7 +28,7 @@
<item>
<widget class="KCalcDisplay" name="calc_display">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
......@@ -47,7 +47,7 @@
<item>
<widget class="KCalcBitset" name="mBitset" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
......@@ -80,19 +80,6 @@
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<property name="leftMargin">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment