mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Fix main menu night theme layout for non-English.
The place for the phrase was too small because of huge left padding.
This commit is contained in:
parent
10906e2e16
commit
794ad7bda7
1 changed files with 3 additions and 3 deletions
|
@ -134,9 +134,9 @@ int Menu::processAction(QAction *action, int index, int width) {
|
|||
int textw = _st.itemFont->width(actionText);
|
||||
int goodw = _st.itemPadding.left() + textw + _st.itemPadding.right();
|
||||
if (data.hasSubmenu) {
|
||||
goodw += _st.itemPadding.left() + _st.arrow.width();
|
||||
goodw += _st.itemPadding.right() + _st.arrow.width();
|
||||
} else if (!actionShortcut.isEmpty()) {
|
||||
goodw += _st.itemPadding.left() + _st.itemFont->width(actionShortcut);
|
||||
goodw += _st.itemPadding.right() + _st.itemFont->width(actionShortcut);
|
||||
}
|
||||
if (action->isCheckable()) {
|
||||
auto updateCallback = [this, index] { updateItem(index); };
|
||||
|
@ -146,7 +146,7 @@ int Menu::processAction(QAction *action, int index, int width) {
|
|||
} else {
|
||||
data.toggle = std::make_unique<ToggleView>(_st.itemToggle, action->isChecked(), updateCallback);
|
||||
}
|
||||
goodw += _st.itemPadding.left() + data.toggle->getSize().width() - _st.itemToggleShift;
|
||||
goodw += _st.itemPadding.right() + data.toggle->getSize().width() - _st.itemToggleShift;
|
||||
} else {
|
||||
data.toggle.reset();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue