Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KCalc
Commits
9ba97875
Commit
9ba97875
authored
Oct 13, 2021
by
Niklas Freund
Browse files
Fixed numeral mode having large empty space when bitset is hidden
parent
152aee8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
kcalc.cpp
View file @
9ba97875
...
...
@@ -2180,7 +2180,6 @@ void KCalculator::showScienceButtons(bool toggled)
void
KCalculator
::
showLogicButtons
(
bool
toggled
)
{
if
(
toggled
)
{
firstVerticalLayout
->
setStretch
(
1
,
1
);
mBitset
->
setEnabled
(
true
);
connect
(
mBitset
,
&
KCalcBitset
::
valueChanged
,
this
,
&
KCalculator
::
slotBitsetChanged
);
connect
(
calc_display
,
&
KCalcDisplay
::
changedAmount
,
this
,
&
KCalculator
::
slotUpdateBitset
);
...
...
@@ -2206,7 +2205,6 @@ void KCalculator::showLogicButtons(bool toggled)
(
num_button_group_
->
button
(
i
))
->
show
();
}
}
else
{
firstVerticalLayout
->
setStretch
(
1
,
0
);
mBitset
->
setEnabled
(
false
);
disconnect
(
mBitset
,
&
KCalcBitset
::
valueChanged
,
this
,
&
KCalculator
::
slotBitsetChanged
);
disconnect
(
calc_display
,
&
KCalcDisplay
::
changedAmount
,
this
,
&
KCalculator
::
slotUpdateBitset
);
...
...
@@ -2295,6 +2293,7 @@ void KCalculator::slotBitsetshow(bool toggled)
bool
wasMinimumSize
=
isMinimumSize
();
mBitset
->
setVisible
(
toggled
);
setBitsetLayoutActive
(
toggled
);
if
(
KCalcSettings
::
calculatorMode
()
==
KCalcSettings
::
EnumCalculatorMode
::
numeral
)
{
KCalcSettings
::
setShowBitset
(
toggled
);
}
...
...
@@ -2631,6 +2630,15 @@ void KCalculator::setLeftPadLayoutActive(bool active)
leftPad
->
setSizePolicy
(
policy
);
}
//------------------------------------------------------------------------------
// Name: setBitsetLayoutActive
// Desc: Enable/disable whether mBitset affects the layout
//------------------------------------------------------------------------------
void
KCalculator
::
setBitsetLayoutActive
(
bool
active
)
{
firstVerticalLayout
->
setStretch
(
1
,
(
int
)
active
);
// 0 or 1
}
//------------------------------------------------------------------------------
// Name: event
// Desc: catch application's palette and font change events
...
...
kcalc.h
View file @
9ba97875
...
...
@@ -134,6 +134,7 @@ private:
bool
isMinimumSize
();
void
forceResizeEvent
();
void
setLeftPadLayoutActive
(
bool
active
);
void
setBitsetLayoutActive
(
bool
active
);
void
updateDisplay
(
UpdateFlags
flags
);
void
updateHistoryWithFunction
(
CalcEngine
::
Operation
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment