View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017981 | Scribus | User Interface | public | 2026-09-19 08:54 | 2026-09-19 08:54 |
| Reporter | buttar | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Platform | Linux | OS | Fedora Workstation | OS Version | 44 |
| Product Version | 1.7.4.svn | ||||
| Summary | 0017981: [patch] Palette font preference does not scale dock contents consistently | ||||
| Description | * Makes `Preferences → User Interface → Font Sizes → Palettes` apply consistently throughout dock-palette contents. -- Propagates font size locally through palette widget hierarchies. -- Preserves widgets that intentionally use a different font size. -- Applies the same Palette font to ADS dock-tab title labels. -- Leaves surrounding ADS chrome, menus, toolbars, and application-level fonts unchanged. -- Changes font handling only; palette colours, stylesheets, and theme behaviour remain untouched. | ||||
| Tags | #please_test | ||||
| Attached Files | mui1-palette-font-propagation-v1.03.patch (1,541 bytes)
Index: scribus/ui/docks/dock_panelbase.cpp
===================================================================
--- scribus/ui/docks/dock_panelbase.cpp (revision 27827)
+++ scribus/ui/docks/dock_panelbase.cpp (working copy)
@@ -26,6 +26,7 @@
#include "prefsfile.h"
#include "prefsmanager.h"
#include "scribusapp.h"
+#include "third_party/Qt-Advanced-Docking-System/src/DockWidgetTab.h"
DockPanelBase::DockPanelBase(const QString &title, QString iconName, QWidget *parent)
: CDockWidget(title, parent)
@@ -76,9 +77,31 @@
void DockPanelBase::setFontSize()
{
+ const int oldPointSize = font().pointSize();
+ const int newPointSize = PrefsManager::instance().appPrefs.uiPrefs.paletteFontSize;
+
QFont newfont(font());
- newfont.setPointSize(PrefsManager::instance().appPrefs.uiPrefs.paletteFontSize);
+ newfont.setPointSize(newPointSize);
setFont(newfont);
+ if (auto *tab = tabWidget())
+ {
+ tab->setFont(newfont);
+ if (QWidget *titleLabel = tab->findChild<QWidget *>("dockWidgetTabLabel"))
+ titleLabel->setFont(newfont);
+ }
+
+ // Qt style sheets can block runtime font inheritance. Propagate only the
+ // palette font size, leaving widgets with a deliberately different size alone.
+ const auto childWidgets = findChildren<QWidget *>();
+ for (QWidget *child : childWidgets)
+ {
+ if (child->isWindow() || child->font().pointSize() != oldPointSize)
+ continue;
+
+ QFont childFont(child->font());
+ childFont.setPointSize(newPointSize);
+ child->setFont(childFont);
+ }
}
void DockPanelBase::iconSetChange()
| ||||
| Patch | Yes | ||||