mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-08 04:44:13 +02:00
Always use Qt's own colour dialog
On GTK desktops (Mint, XFCE, GNOME) Qt hands QColorDialog to GTK's chooser. Its "Custom" row is a recent-colours list kept by GTK: every colour picked is pushed in on the left and the oldest drops out, so a user's saved wire colours are lost (forum topic 3190). It also ignores the custom colours QET saves (#918) and has no swatch grid for the double-click to accept (#1172). Pass DontUseNativeDialog at every colour dialog, so all platforms get the dialog Windows already shows: 16 custom slots that change only on "Add to Custom Colors", saved across restarts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -177,6 +177,9 @@ DiagramView::DiagramView(Diagram *diagram, QWidget *parent) :
|
||||
#ifdef Q_OS_MACOS
|
||||
color_dialog -> setWindowFlags(Qt::Sheet);
|
||||
#endif
|
||||
// Qt's own dialog on every platform: the GTK one keeps its own
|
||||
// recent-colours row and ignores the custom colours QET saves
|
||||
color_dialog->setOption(QColorDialog::DontUseNativeDialog);
|
||||
color_dialog->setCurrentColor(initial_properties.color);
|
||||
ColorDialogDoubleClick::install(color_dialog);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user