Commit f01b106b authored by David Jarvie's avatar David Jarvie
Browse files

Fix display errors in time edit field arrows

parent c1473660
Pipeline #92539 passed with stage
in 6 minutes and 24 seconds
KAlarm Change Log
=== Version 3.3.2 (KDE Applications 21.08.3) --- 25 October 2021 ===
=== Version 3.3.2 (KDE Applications 21.08.3) --- 30 October 2021 ===
* Make time edit field arrows work with Breeze application style [KDE Bug 443062]
* Fix display errors in time edit field arrows.
* Fix unusable sub-daily recurrence editor with non-Breeze application style.
* Use translated forms of "am" and "pm" when displaying times.
......
This diff is collapsed.
......@@ -213,7 +213,7 @@ public:
* @param page The shift step increment for the left-hand spin buttons.
* @param control The control step increment for the left-hand spin buttons.
* N.B. Qt multiplies the step increment by 10 when the Control
* key is pressed, so this parameter value should be
* key is pressed, so this parameter value should be
* @param modControl Control steps should always set value to multiple of @p step.
*/
void setShiftSteps(int line, int page, int control, bool modControl = true);
......@@ -273,8 +273,9 @@ protected:
void showEvent(QShowEvent*) override;
virtual void getMetrics() const;
mutable int wUpdown2; // width of second spin widget
mutable int wSpinboxHide; // width at left of 'mSpinbox' hidden by second spin widget
mutable int wUpdown2 {0}; // width of second spin widget, including outer frame decoration
mutable int wBorderWidth; // thickness of border between spin buttons and edge of widget
mutable int wFrameWidth; // thickness of frame round widget
mutable QPoint mButtonPos; // position of buttons inside mirror widget
mutable bool mShowUpdown2 {true}; // the extra pair of spin buttons are displayed
......@@ -301,10 +302,10 @@ private:
class MainSpinBox : public SpinBox
{
public:
MainSpinBox(SpinBox2* sb2, QWidget* parent)
: SpinBox(parent), owner(sb2) { }
MainSpinBox(int minValue, int maxValue, SpinBox2* sb2, QWidget* parent)
: SpinBox(minValue, maxValue, parent), owner(sb2) { }
MainSpinBox(SpinBox2* parent)
: SpinBox(parent), owner(parent) { }
MainSpinBox(int minValue, int maxValue, SpinBox2* parent)
: SpinBox(minValue, maxValue, parent), owner(parent) { }
QString textFromValue(int v) const override { return owner->textFromValue(v); }
int valueFromText(const QString& t) const override
{ return owner->valueFromText(t); }
......@@ -323,8 +324,7 @@ private:
enum { NO_BUTTON = -1, UP, DOWN, UP2, DOWN2 };
static int mRightToLeft; // widgets are mirrored right to left
QFrame* mSpinboxFrame; // contains the main spin box
ExtraSpinBox* mUpdown2; // the extra pair of spin buttons
ExtraSpinBox* mSpinbox2; // the extra pair of spin buttons
MainSpinBox* mSpinbox; // the visible spin box
SpinMirror* mSpinMirror; // image of the extra pair of spin buttons
int mMinValue;
......
......@@ -57,8 +57,8 @@ public:
explicit SpinMirror(ExtraSpinBox*, SpinBox*, QWidget* parent = nullptr);
void setReadOnly(bool ro) { mReadOnly = ro; }
bool isReadOnly() const { return mReadOnly; }
void setButtons();
void setFrame();
void setFrameImage();
void setButtonsImage();
void setButtonPos(const QPoint&);
void rearrange();
......
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