Skip to content

Commit

Permalink
Merge branch 'partial_revert_ampersand' into 'master'
Browse files Browse the repository at this point in the history
Revert part of mnenonic fix

See merge request fw-oss/qlementine!50
  • Loading branch information
christophe-thiery-fw committed Oct 23, 2023
2 parents 3891a39 + f3c30e8 commit abefb47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/style/QlementineStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ void QlementineStyle::drawControl(ControlElement ce, const QStyleOption* opt, QP
if (availableW > 0 && hasText) {
const auto textRect = QRect{ availableX, rect.y(), availableW, rect.height() };
const auto textFlags =
Qt::AlignVCenter | Qt::AlignBaseline | Qt::TextSingleLine | Qt::AlignLeft;
Qt::AlignVCenter | Qt::AlignBaseline | Qt::TextSingleLine | Qt::TextHideMnemonic | Qt::AlignLeft;
// TODO handle expanding QTabBar.
// if (expandingTabBar) {
// textFlags |= Qt::AlignHCenter;
Expand Down Expand Up @@ -1299,7 +1299,7 @@ void QlementineStyle::drawControl(ControlElement ce, const QStyleOption* opt, QP
const auto mouse = getMouseState(optProgressBar->state);
const auto& color = labelForegroundColor(mouse, w);
const auto textFlags =
Qt::AlignVCenter | Qt::AlignBaseline | Qt::TextSingleLine | Qt::AlignRight;
Qt::AlignVCenter | Qt::AlignBaseline | Qt::TextSingleLine | Qt::AlignRight | Qt::TextHideMnemonic;
p->setBrush(Qt::NoBrush);
p->setPen(color);
p->drawText(optProgressBar->rect, textFlags, optProgressBar->text);
Expand Down Expand Up @@ -2029,7 +2029,7 @@ void QlementineStyle::drawControl(ControlElement ce, const QStyleOption* opt, QP
optComboBox->currentText, Qt::ElideRight, availableW, Qt::TextSingleLine);
const auto textRect = QRect{ availableX, contentRect.y(), availableW, contentRect.height() };
constexpr auto textFlags =
Qt::AlignVCenter | Qt::AlignBaseline | Qt::TextSingleLine | Qt::AlignLeft;
Qt::AlignVCenter | Qt::AlignBaseline | Qt::TextSingleLine | Qt::AlignLeft | Qt::TextHideMnemonic;
p->setBrush(Qt::NoBrush);

const auto status = widgetStatus(w);
Expand Down

0 comments on commit abefb47

Please sign in to comment.