Skip to content

Commit

Permalink
#2950 fix: try to fix automatic resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
pbek committed Jan 30, 2024
1 parent 2359053 commit f1d68a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,9 @@
# QOwnNotes Changelog

## 24.1.5
- an attempt was made to fix the issue that shortcut settings table columns
didn't get resized to fit the containing text on some computers
(for [#2950](https://github.com/pbek/QOwnNotes/issues/2950))
- the Snap version of QOwnNotes is now able to use git
(for [#1306](https://github.com/pbek/QOwnNotes/issues/1306))

Expand Down
15 changes: 9 additions & 6 deletions src/dialogs/settingsdialog.cpp
Expand Up @@ -1612,10 +1612,6 @@ void SettingsDialog::loadShortcutSettings() {
menuItem->setExpanded(true);
}
}

ui->shortcutTreeWidget->resizeColumnToContents(0);
ui->shortcutTreeWidget->resizeColumnToContents(1);
ui->shortcutTreeWidget->resizeColumnToContents(2);
}

/**
Expand Down Expand Up @@ -3264,8 +3260,15 @@ void SettingsDialog::on_settingsTreeWidget_currentItemChanged(QTreeWidgetItem *c

ui->settingsStackedWidget->setCurrentIndex(currentIndex);

if (currentIndex == SettingsPages::LayoutPage) {
ui->layoutWidget->resizeLayoutImage();
switch (currentIndex) {
case SettingsPages::LayoutPage:
ui->layoutWidget->resizeLayoutImage();
break;
case SettingsPages::ShortcutPage:
ui->shortcutTreeWidget->resizeColumnToContents(0);
ui->shortcutTreeWidget->resizeColumnToContents(1);
ui->shortcutTreeWidget->resizeColumnToContents(2);
break;
}
}

Expand Down

0 comments on commit f1d68a4

Please sign in to comment.