Commit 7389aa55 authored by Henrik Fehlauer's avatar Henrik Fehlauer

Fix padding of "Fit Width" button

Summary:
3e10699a introduced "Fit to Width", but failed to adapt the width
calculation of the zoom mode buttons in the bottom zoom widget bar
accordingly. This resulted in the middle button getting its text cut off
for some languages, looking like this:

{F5431466}

There are several options to remedy this:
- Give equal width to all buttons
- Give equal width to the outer buttons (i.e. symmetric, probably the initial intention when there were only two buttons)
- Just respect the size hint of each button individually

| {F5431473} | {F5431474} | {F5431476} |

As the three buttons are already quite wide, in order not to impact the
minimal window size too much (rules out "equal width") and at the same
time not to make the "Fit" button for English too narrow (rules out
"individual width") we choose the "symmetric" option.

BUG: 385035

Test Plan:
Switch application language to Czech, view image. Text in "Fit to Width"
(i.e. middle) button not cut off anymore, minimal window size only
slightly impacted. For English, the "Fit" button is still wide enough.

Reviewers: #kde_applications, broulik

Reviewed By: broulik

Subscribers: broulik

Differential Revision: https://phabricator.kde.org/D8306
parent 23563281
......@@ -157,7 +157,6 @@ void ZoomWidget::setActions(QAction* zoomToFitAction, QAction* actualSizeAction,
int width = qMax(d->mZoomToFitButton->sizeHint().width(), d->mActualSizeButton->sizeHint().width());
d->mZoomToFitButton->setFixedWidth(width);
d->mActualSizeButton->setFixedWidth(width);
d->mZoomToFitWidthButton->setFixedWidth(width);
}
void ZoomWidget::slotZoomSliderActionTriggered()
......
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