From 9e3be890a39346ca6dc228f0967b1a3939265ac4 Mon Sep 17 00:00:00 2001 From: askmeaboutloom Date: Mon, 22 Jul 2024 11:48:44 +0200 Subject: [PATCH] Give wheel, palette and navigator a minimum size So that they can't be squished into oblivion. The minimum size is still very small to avoid causing trouble for users with dinky resolutions, but they now no longer at zero, where you could have a dock that's confusingly just a header. Relates to #1349. --- ChangeLog | 1 + src/desktop/docks/colorpalette.cpp | 1 + src/desktop/docks/colorspinner.cpp | 1 + src/desktop/docks/navigator.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 35c1eb2419..c4858ec276 100644 --- a/ChangeLog +++ b/ChangeLog @@ -92,6 +92,7 @@ Unreleased Version 2.2.2-pre * Fix: Compensate for discontinuity in the classic soft brush radius to make the transition look less bumpy. Thanks BulletPepper for reporting. * Feature: Make color sliders dock smaller by showing only one set of sliders at a time and add an input field for a hex color name. Thanks Kawaxte and MorrowShore for suggesting. * Fix: Don't switch tools while typing into text fields in some situations. Thanks leopardheart982 for reporting. + * Fix: Give color wheel, color palette and navigator docks a minimum size so that they can't be shrunken into nonexistence. Thanks vipperz for reporting. 2024-02-25 Version 2.2.2-beta.1 * Server Feature: Allow adding a message when kicking someone through the admin API. diff --git a/src/desktop/docks/colorpalette.cpp b/src/desktop/docks/colorpalette.cpp index 6f149fa946..82a1f13433 100644 --- a/src/desktop/docks/colorpalette.cpp +++ b/src/desktop/docks/colorpalette.cpp @@ -175,6 +175,7 @@ ColorPaletteDock::ColorPaletteDock(const QString &title, QWidget *parent) choiceLayout->addWidget(menuButton); d->paletteWidget = new widgets::PaletteWidget{this}; + d->paletteWidget->setMinimumHeight(20); layout->addWidget(d->paletteWidget, 1); connect( d->paletteWidget, &widgets::PaletteWidget::colorSelected, this, diff --git a/src/desktop/docks/colorspinner.cpp b/src/desktop/docks/colorspinner.cpp index d23795bc0d..32001af990 100644 --- a/src/desktop/docks/colorspinner.cpp +++ b/src/desktop/docks/colorspinner.cpp @@ -38,6 +38,7 @@ ColorSpinnerDock::ColorSpinnerDock(const QString& title, QWidget *parent) // Create main widget d->colorwheel = new color_widgets::ColorWheel(this); + d->colorwheel->setMinimumSize(64, 64); setWidget(d->colorwheel); connect(d->colorwheel, &color_widgets::ColorWheel::colorSelected, this, &ColorSpinnerDock::colorSelected); diff --git a/src/desktop/docks/navigator.cpp b/src/desktop/docks/navigator.cpp index faf257bdfa..1d0d80484f 100644 --- a/src/desktop/docks/navigator.cpp +++ b/src/desktop/docks/navigator.cpp @@ -514,6 +514,7 @@ Navigator::Navigator(QWidget *parent) m_view->addAction(realtimeUpdateAction); m_view->setContextMenuPolicy(Qt::ActionsContextMenu); + m_view->setMinimumHeight(32); auto &settings = dpApp().settings(); settings.bindNavigatorShowCursors(showCursorsAction);