View Issue Details

IDProjectCategoryView StatusLast Update
0017419ScribusUsabilitypublic2025-02-24 21:31
Reporterale Assigned To 
PrioritynormalSeverityminorReproducibilityN/A
Status newResolutionopen 
Product Version1.7.1.svn 
Summary0017419: On activating the palettes / windows
DescriptionNow that the most important "tool" windows and palettes are supposed to be anchored in tabs in the side panels, there is a smaller but rather disturbing misbehavior:

if a tab is currently inactive (hidden behind the one that is active), using the menus or the shortcut keys to activate them, will end in the tab being removed.

the correct behavior would be to bring it in the foreground.

the new behavior should apply to all the current ways to hide and show window:

- menus
- action search
- keyboard shortcut
TagsNo tags attached.
PatchYes

Activities

ale

2025-02-15 06:51

manager   ~0052056

Here some further thoughts:

- if the window is floating the current behavior is fine.
- if the window is docked but hidden, the window shall be brought to the foreground.
- when the palette is already in the foreground, i'm not sure, if there is a need for removing the window from the panel with the key press or menu (the close button in the tab (or making it floating and the closing) might be enough and less "unexpected" for the user)
  (now that i think about it: if you try to bring to the foreground a tab that is already displayed it might "pulsate" : - )

seems simple to implement (if there is a "simple" way to detect if the tab is attached somewhere and in foreground / background...

ale

2025-02-22 16:04

manager   ~0052105

@nitramr is this something that should be solved by Qt-Advanced-Docking-System ?

from what i've seen, F2 goes to a toggleView() signal that seems to be handled by it...

nitramr

2025-02-23 15:42

developer   ~0052106

ADS has already an implementation for this.

If the menu action have a checkbox, it will show and hide the palette
If the menu action does not have a checkbox, it will always show/activate the palette

The patch contains 3 changes:
- removing the checkable state in ActionManager
- reimplement the menu action in ScribusMainWindow (this change will work with checkable menus and non-checkable menus, it is the recommended implementation by ADS)
- change checkable state in shape plugin

Now, you can close the palette only via "x" button and bring it foreground by menu action or related shortcut.
palettevis_2025-02-23_01.patch (12,303 bytes)   
Index: scribus/actionmanager.cpp
===================================================================
--- scribus/actionmanager.cpp	(Revision 26724)
+++ scribus/actionmanager.cpp	(Arbeitskopie)
@@ -919,21 +919,11 @@
 	(*scrActions)["toolsSymbols"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsInline"]->setShortcutContext(Qt::ApplicationShortcut);
 
-
 	(*scrActions)["toolsProperties"]->setToggleAction(true);
 	(*scrActions)["toolsContent"]->setToggleAction(true);
-	(*scrActions)["toolsOutline"]->setToggleAction(true);
-	(*scrActions)["toolsScrapbook"]->setToggleAction(true);
-	(*scrActions)["toolsLayers"]->setToggleAction(true);
-	(*scrActions)["toolsPages"]->setToggleAction(true);
-	(*scrActions)["toolsBookmarks"]->setToggleAction(true);
 	(*scrActions)["toolsDownloads"]->setToggleAction(true);
 	(*scrActions)["toolsMeasurements"]->setToggleAction(true);
-	(*scrActions)["toolsActionHistory"]->setToggleAction(true);
 	(*scrActions)["toolsPreflightVerifier"]->setToggleAction(true);
-	(*scrActions)["toolsAlignDistribute"]->setToggleAction(true);
-	(*scrActions)["toolsSymbols"]->setToggleAction(true);
-	(*scrActions)["toolsInline"]->setToggleAction(true);
 	(*scrActions)["toolsToolbarTools"]->setToggleAction(true);
 	(*scrActions)["toolsToolbarPDF"]->setToggleAction(true);
 	(*scrActions)["toolsToolbarView"]->setToggleAction(true);
@@ -956,7 +946,6 @@
 
 	*nonEditActionNames << "itemLowerToBottom" << "itemRaiseToTop" << "itemRaise" << "itemLower";
 
-	connect( (*scrActions)["toolsActionHistory"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoPalette(bool)) );
 	connect( (*scrActions)["toolsResources"], SIGNAL(triggered()), mainWindow, SLOT(slotResourceManager()) );
 	connectModeActions();
 }
Index: scribus/plugins/shapes/shapeplugin.cpp
===================================================================
--- scribus/plugins/shapes/shapeplugin.cpp	(Revision 26724)
+++ scribus/plugins/shapes/shapeplugin.cpp	(Arbeitskopie)
@@ -71,16 +71,23 @@
 
 	sc_palette->setMainWindow(mw);	
 	languageChange();
-	m_actions.insert("shapeShowPalette", new ScrAction(QObject::tr("Custom Shapes"), QKeySequence(), this));
-	m_actions["shapeShowPalette"]->setToggleAction(true);
-	m_actions["shapeShowPalette"]->setChecked(false);
-	connect(m_actions["shapeShowPalette"], SIGNAL(toggled(bool)), sc_palette, SLOT(toggleView(bool)));
-	connect(sc_palette, SIGNAL(viewToggled(bool)), m_actions["shapeShowPalette"], SLOT(setChecked(bool)));
+	m_actions.insert("shapeShowPalette", new ScrAction(fullTrName(), QKeySequence(), this));
+
+	// Use this if menu action is checkable
+	// m_actions["shapeShowPalette"]->setToggleAction(true);
+	// m_actions["shapeShowPalette"]->setChecked(false);
+	// connect(m_actions["shapeShowPalette"], SIGNAL(toggled(bool)), sc_palette, SLOT(toggleView(bool)));
+	// connect(sc_palette, SIGNAL(viewToggled(bool)), m_actions["shapeShowPalette"], SLOT(setChecked(bool)));
+
+	// Use this if menu action is not checkable
+	connect(m_actions["shapeShowPalette"], SIGNAL(triggered()), sc_palette, SLOT(toggleView()));
+
 	mw->scrMenuMgr->addMenuItemStringAfter("shapeShowPalette", "toolsInline", "Windows");
 	mw->scrMenuMgr->addMenuItemStringsToMenuBar("Windows", m_actions);
 
 	// For some reason we can't call addDockWidget(...) directly. If we do so Scribus crashes.
-	mw->dockManager->addDockFromPlugin(sc_palette);
+	mw->dockManager->addDockFromPlugin(sc_palette, false);
+
 }
 
 QString ShapePlugin::fullTrName() const
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(Revision 26724)
+++ scribus/scribus.cpp	(Arbeitskopie)
@@ -694,14 +694,12 @@
 	// Outliner
 	outlinePalette = dockManager->outlinePalette;
 	outlinePalette->setMainWindow(this);
-	connect( scrActions["toolsOutline"], SIGNAL(toggled(bool)) , outlinePalette, SLOT(toggleView(bool)));
-	connect( outlinePalette, SIGNAL(viewToggled(bool)), scrActions["toolsOutline"], SLOT(setChecked(bool)));
+	outlinePalette->setToggleViewAction(scrActions["toolsOutline"]);
 
 	// Frame Properties
 	propertiesPalette = dockManager->propertiesPalette;
 	propertiesPalette->setMainWindow(this);
-	connect( scrActions["toolsProperties"], SIGNAL(toggled(bool)) , propertiesPalette, SLOT(toggleView(bool)));
-	connect( propertiesPalette, SIGNAL(viewToggled(bool)), scrActions["toolsProperties"], SLOT(setChecked(bool)));
+	propertiesPalette->setToggleViewAction(scrActions["toolsProperties"]);
 	emit UpdateRequest(reqDefFontListUpdate);
 	propertiesPalette->installEventFilter(this);
 
@@ -708,8 +706,7 @@
 	// Content Properties
 	contentPalette = dockManager->contentPalette;
 	contentPalette->setMainWindow(this);
-	connect( scrActions["toolsContent"], SIGNAL(toggled(bool)), contentPalette, SLOT(toggleView(bool)));
-	connect( contentPalette, SIGNAL(viewToggled(bool)), scrActions["toolsContent"], SLOT(setChecked(bool)));
+	contentPalette->setToggleViewAction(scrActions["toolsContent"]);
 	contentPalette->installEventFilter(this);
 
 	// Nodes
@@ -724,14 +721,12 @@
 
 	// Layer
 	layerPalette = dockManager->layerPalette;
-	connect( scrActions["toolsLayers"], SIGNAL(toggled(bool)) , layerPalette, SLOT(toggleView(bool)));
-	connect( layerPalette, SIGNAL(viewToggled(bool)), scrActions["toolsLayers"], SLOT(setChecked(bool)));
+	layerPalette->setToggleViewAction(scrActions["toolsLayers"]);
 	layerPalette->installEventFilter(this);
 
 	// Scrapbook
 	scrapbookPalette = dockManager->scrapbookPalette;
-	connect( scrActions["toolsScrapbook"], SIGNAL(toggled(bool)) , scrapbookPalette, SLOT(toggleView(bool)));
-	connect( scrapbookPalette, SIGNAL(viewToggled(bool)), scrActions["toolsScrapbook"], SLOT(setChecked(bool)));
+	scrapbookPalette->setToggleViewAction(scrActions["toolsScrapbook"]);
 	connect( scrapbookPalette, SIGNAL(pasteToActualPage(QString)), this, SLOT(pasteFromScrapbook(QString)));
 	connect( scrapbookPalette, SIGNAL(scrapbookListChanged()), this, SLOT(rebuildScrapbookMenu()));
 	scrapbookPalette->installEventFilter(this);
@@ -739,14 +734,12 @@
 	// Pages
 	pagePalette = dockManager->pagePalette;
 	pagePalette->setMainWindow(this);
-	connect( scrActions["toolsPages"], SIGNAL(toggled(bool)) , pagePalette, SLOT(toggleView(bool)) );
-	connect( pagePalette, SIGNAL(viewToggled(bool)), scrActions["toolsPages"], SLOT(setChecked(bool)));
+	pagePalette->setToggleViewAction(scrActions["toolsPages"]);
 	pagePalette->installEventFilter(this);
 
 	// Bookmark
 	bookmarkPalette = dockManager->bookPalette;
-	connect( scrActions["toolsBookmarks"], SIGNAL(toggled(bool)) , bookmarkPalette, SLOT(toggleView(bool)) );
-	connect( bookmarkPalette, SIGNAL(viewToggled(bool)), scrActions["toolsBookmarks"], SLOT(setChecked(bool)));
+	bookmarkPalette->setToggleViewAction(scrActions["toolsBookmarks"]);
 	bookmarkPalette->installEventFilter(this);
 
 	// Downloads
@@ -767,8 +760,7 @@
 
 	// Align & Distribute
 	alignDistributePalette = dockManager->alignDistributePalette;
-	connect( scrActions["toolsAlignDistribute"], SIGNAL(toggled(bool)) , alignDistributePalette, SLOT(toggleView(bool)) );
-	connect( alignDistributePalette, SIGNAL(viewToggled(bool)), scrActions["toolsAlignDistribute"], SLOT(setChecked(bool)));
+	alignDistributePalette->setToggleViewAction(scrActions["toolsAlignDistribute"]);
 	connect( alignDistributePalette, SIGNAL(documentChanged()), this, SLOT(slotDocCh()));
 	alignDistributePalette->installEventFilter(this);
 
@@ -775,8 +767,7 @@
 	// Symbols
 	symbolPalette = dockManager->symbolPalette;
 	symbolPalette->setMainWindow(this);
-	connect(scrActions["toolsSymbols"], SIGNAL(toggled(bool)), symbolPalette, SLOT(toggleView(bool)) );
-	connect(symbolPalette, SIGNAL(viewToggled(bool)), scrActions["toolsSymbols"], SLOT(setChecked(bool)));
+	symbolPalette->setToggleViewAction(scrActions["toolsSymbols"]);
 	connect(symbolPalette, SIGNAL(startEdit(QString)), this, SLOT(editSymbolStart(QString)));
 	connect(symbolPalette, SIGNAL(endEdit()), this, SLOT(editSymbolEnd()));
 	connect(symbolPalette, SIGNAL(objectDropped()), this, SLOT(PutToPatterns()));
@@ -785,8 +776,7 @@
 	// Inline Elements
 	inlinePalette = dockManager->inlinePalette;
 	inlinePalette->setMainWindow(this);
-	connect(scrActions["toolsInline"], SIGNAL(toggled(bool)), inlinePalette, SLOT(toggleView(bool)) );
-	connect(inlinePalette, SIGNAL(viewToggled(bool)), scrActions["toolsInline"], SLOT(setChecked(bool)));
+	inlinePalette->setToggleViewAction(scrActions["toolsInline"]);
 	connect(inlinePalette, SIGNAL(startEdit(int)), this, SLOT(editInlineStart(int)));
 	connect(inlinePalette, SIGNAL(endEdit()), this, SLOT(editInlineEnd()));
 	connect(inlinePalette, SIGNAL(objectDropped(QString)), this, SLOT(PutToInline(QString)));
@@ -794,9 +784,9 @@
 
 	// Undo
 	undoPalette = dockManager->undoPalette;
+	undoPalette->setToggleViewAction(scrActions["toolsActionHistory"]);
 	undoPalette->installEventFilter(this);
 	m_undoManager->registerGui(undoPalette);
-	connect(undoPalette, SIGNAL(viewToggled(bool)), this, SLOT(setUndoPalette(bool)));
 	connect(undoPalette, SIGNAL(objectMode(bool)), this, SLOT(setUndoMode(bool)));
 
 	// initializing style manager here too even it's not strictly a palette
@@ -5448,52 +5438,19 @@
 	if (m_palettesStatus[PAL_ALL])
 	{
 		m_palettesStatus[PAL_ALL] = false;
-//		if (m_palettesStatus[PAL_PROPERTIES])
-//			propertiesPalette->toggleView(true);
-//		if (m_palettesStatus[PAL_CONTENT])
-//			contentPalette->toggleView(true);
-//		if (m_palettesStatus[PAL_OUTLINE])
-//			outlinePalette->toggleView(true);
-//		if (m_palettesStatus[PAL_SCRAPBOOK])
-//			scrapbookPalette->toggleView(true);
-//		if (m_palettesStatus[PAL_LAYER])
-//			layerPalette->toggleView(true);
-//		if (m_palettesStatus[PAL_PAGE])
-//			pagePalette->toggleView(true);
-//		if (m_palettesStatus[PAL_BOOKMARK])
-//			bookmarkPalette->toggleView(true);
+
 		if (m_palettesStatus[PAL_VERIFIER])
 			docCheckerPalette->show();
 		if (m_palettesStatus[PAL_DOWNLOADS])
 			downloadsPalette->show();
-//		if (m_palettesStatus[PAL_ALIGNDISTRIBUTE])
-//			alignDistributePalette->toggleView(true);
-//		setUndoPalette(m_palettesStatus[PAL_UNDO]);
 	}
 	else
 	{
-//		m_palettesStatus[PAL_PROPERTIES] = !propertiesPalette->isClosed();
-//		m_palettesStatus[PAL_CONTENT] = !contentPalette->isClosed();
-//		m_palettesStatus[PAL_OUTLINE] = !outlinePalette->isClosed();
-//		m_palettesStatus[PAL_SCRAPBOOK] = !scrapbookPalette->isClosed();
-//		m_palettesStatus[PAL_LAYER] = !layerPalette->isClosed();
-//		m_palettesStatus[PAL_PAGE] = !pagePalette->isClosed();
-//		m_palettesStatus[PAL_BOOKMARK] = !bookmarkPalette->isClosed();
-//		m_palettesStatus[PAL_UNDO] = !undoPalette->isClosed();
 		m_palettesStatus[PAL_VERIFIER] = docCheckerPalette->isVisible();
 		m_palettesStatus[PAL_DOWNLOADS] = downloadsPalette->isVisible();
-//		m_palettesStatus[PAL_ALIGNDISTRIBUTE] = !alignDistributePalette->isClosed();
-//		propertiesPalette->toggleView(false);
-//		contentPalette->toggleView(false);
-//		outlinePalette->toggleView(false);
-//		scrapbookPalette->toggleView(false);
-//		bookmarkPalette->toggleView(false);
-//		pagePalette->toggleView(false);
-//		layerPalette->toggleView(false);
+
 		docCheckerPalette->hide();
 		downloadsPalette->hide();
-//		alignDistributePalette->toggleView(false);
-//		setUndoPalette(false);
 		m_palettesStatus[PAL_ALL] = true;
 	}
 }
@@ -5503,23 +5460,11 @@
 	m_palettesStatus[PAL_ALL] = false;
 }
 
-void ScribusMainWindow::setUndoPalette(bool visible)
-{
-	undoPalette->toggleView(visible);
-	scrActions["toolsActionHistory"]->setChecked(visible);
-}
-
 void ScribusMainWindow::togglePagePalette()
 {
 	m_palettesStatus[PAL_ALL] = false;
 }
 
-void ScribusMainWindow::toggleUndoPalette()
-{
-	setUndoPalette(undoPalette->isClosed());
-	m_palettesStatus[PAL_ALL] = false;
-}
-
 void ScribusMainWindow::toggleImageVisibility()
 {
 	if (!doc)
Index: scribus/scribus.h
===================================================================
--- scribus/scribus.h	(Revision 26724)
+++ scribus/scribus.h	(Arbeitskopie)
@@ -455,8 +455,6 @@
 	void toggleRulers();
 	void toggleRulerMode();
 	void togglePagePalette();
-	void toggleUndoPalette();
-	void setUndoPalette(bool visible);
 	void toggleCheckPal();
 	/** \brief Schaltet M_ViewShowImages ein/aus */
 	void toggleImageVisibility();
palettevis_2025-02-23_01.patch (12,303 bytes)   

ale

2025-02-23 19:09

manager   ~0052107

Thanks for the patch!

I give it a try...

I could not see a change in the behavior...

When a palette is hidden behind another one, it still gets closed instead of coming into the foreground.
f2-f3.gif (209,393 bytes)   
f2-f3.gif (209,393 bytes)   

nitramr

2025-02-23 19:28

developer   ~0052108

Sorry, I made a mistake. For some reason, I left the checkboxes for content properties and frame properties palette.
To confirm this, you can check the "windows" menu. You should see only checkboxes only in front of these two palettes.

The new patch fixes that.
palettevis_2025-02-23_02.patch (12,302 bytes)   
Index: scribus/actionmanager.cpp
===================================================================
--- scribus/actionmanager.cpp	(Revision 26724)
+++ scribus/actionmanager.cpp	(Arbeitskopie)
@@ -919,21 +919,9 @@
 	(*scrActions)["toolsSymbols"]->setShortcutContext(Qt::ApplicationShortcut);
 	(*scrActions)["toolsInline"]->setShortcutContext(Qt::ApplicationShortcut);
 
-
-	(*scrActions)["toolsProperties"]->setToggleAction(true);
-	(*scrActions)["toolsContent"]->setToggleAction(true);
-	(*scrActions)["toolsOutline"]->setToggleAction(true);
-	(*scrActions)["toolsScrapbook"]->setToggleAction(true);
-	(*scrActions)["toolsLayers"]->setToggleAction(true);
-	(*scrActions)["toolsPages"]->setToggleAction(true);
-	(*scrActions)["toolsBookmarks"]->setToggleAction(true);
 	(*scrActions)["toolsDownloads"]->setToggleAction(true);
 	(*scrActions)["toolsMeasurements"]->setToggleAction(true);
-	(*scrActions)["toolsActionHistory"]->setToggleAction(true);
 	(*scrActions)["toolsPreflightVerifier"]->setToggleAction(true);
-	(*scrActions)["toolsAlignDistribute"]->setToggleAction(true);
-	(*scrActions)["toolsSymbols"]->setToggleAction(true);
-	(*scrActions)["toolsInline"]->setToggleAction(true);
 	(*scrActions)["toolsToolbarTools"]->setToggleAction(true);
 	(*scrActions)["toolsToolbarPDF"]->setToggleAction(true);
 	(*scrActions)["toolsToolbarView"]->setToggleAction(true);
@@ -956,7 +944,6 @@
 
 	*nonEditActionNames << "itemLowerToBottom" << "itemRaiseToTop" << "itemRaise" << "itemLower";
 
-	connect( (*scrActions)["toolsActionHistory"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoPalette(bool)) );
 	connect( (*scrActions)["toolsResources"], SIGNAL(triggered()), mainWindow, SLOT(slotResourceManager()) );
 	connectModeActions();
 }
Index: scribus/plugins/shapes/shapeplugin.cpp
===================================================================
--- scribus/plugins/shapes/shapeplugin.cpp	(Revision 26724)
+++ scribus/plugins/shapes/shapeplugin.cpp	(Arbeitskopie)
@@ -71,16 +71,23 @@
 
 	sc_palette->setMainWindow(mw);	
 	languageChange();
-	m_actions.insert("shapeShowPalette", new ScrAction(QObject::tr("Custom Shapes"), QKeySequence(), this));
-	m_actions["shapeShowPalette"]->setToggleAction(true);
-	m_actions["shapeShowPalette"]->setChecked(false);
-	connect(m_actions["shapeShowPalette"], SIGNAL(toggled(bool)), sc_palette, SLOT(toggleView(bool)));
-	connect(sc_palette, SIGNAL(viewToggled(bool)), m_actions["shapeShowPalette"], SLOT(setChecked(bool)));
+	m_actions.insert("shapeShowPalette", new ScrAction(fullTrName(), QKeySequence(), this));
+
+	// Use this if menu action is checkable
+	// m_actions["shapeShowPalette"]->setToggleAction(true);
+	// m_actions["shapeShowPalette"]->setChecked(false);
+	// connect(m_actions["shapeShowPalette"], SIGNAL(toggled(bool)), sc_palette, SLOT(toggleView(bool)));
+	// connect(sc_palette, SIGNAL(viewToggled(bool)), m_actions["shapeShowPalette"], SLOT(setChecked(bool)));
+
+	// Use this if menu action is not checkable
+	connect(m_actions["shapeShowPalette"], SIGNAL(triggered()), sc_palette, SLOT(toggleView()));
+
 	mw->scrMenuMgr->addMenuItemStringAfter("shapeShowPalette", "toolsInline", "Windows");
 	mw->scrMenuMgr->addMenuItemStringsToMenuBar("Windows", m_actions);
 
 	// For some reason we can't call addDockWidget(...) directly. If we do so Scribus crashes.
-	mw->dockManager->addDockFromPlugin(sc_palette);
+	mw->dockManager->addDockFromPlugin(sc_palette, false);
+
 }
 
 QString ShapePlugin::fullTrName() const
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(Revision 26724)
+++ scribus/scribus.cpp	(Arbeitskopie)
@@ -694,14 +694,12 @@
 	// Outliner
 	outlinePalette = dockManager->outlinePalette;
 	outlinePalette->setMainWindow(this);
-	connect( scrActions["toolsOutline"], SIGNAL(toggled(bool)) , outlinePalette, SLOT(toggleView(bool)));
-	connect( outlinePalette, SIGNAL(viewToggled(bool)), scrActions["toolsOutline"], SLOT(setChecked(bool)));
+	outlinePalette->setToggleViewAction(scrActions["toolsOutline"]);
 
 	// Frame Properties
 	propertiesPalette = dockManager->propertiesPalette;
 	propertiesPalette->setMainWindow(this);
-	connect( scrActions["toolsProperties"], SIGNAL(toggled(bool)) , propertiesPalette, SLOT(toggleView(bool)));
-	connect( propertiesPalette, SIGNAL(viewToggled(bool)), scrActions["toolsProperties"], SLOT(setChecked(bool)));
+	propertiesPalette->setToggleViewAction(scrActions["toolsProperties"]);
 	emit UpdateRequest(reqDefFontListUpdate);
 	propertiesPalette->installEventFilter(this);
 
@@ -708,8 +706,7 @@
 	// Content Properties
 	contentPalette = dockManager->contentPalette;
 	contentPalette->setMainWindow(this);
-	connect( scrActions["toolsContent"], SIGNAL(toggled(bool)), contentPalette, SLOT(toggleView(bool)));
-	connect( contentPalette, SIGNAL(viewToggled(bool)), scrActions["toolsContent"], SLOT(setChecked(bool)));
+	contentPalette->setToggleViewAction(scrActions["toolsContent"]);
 	contentPalette->installEventFilter(this);
 
 	// Nodes
@@ -724,14 +721,12 @@
 
 	// Layer
 	layerPalette = dockManager->layerPalette;
-	connect( scrActions["toolsLayers"], SIGNAL(toggled(bool)) , layerPalette, SLOT(toggleView(bool)));
-	connect( layerPalette, SIGNAL(viewToggled(bool)), scrActions["toolsLayers"], SLOT(setChecked(bool)));
+	layerPalette->setToggleViewAction(scrActions["toolsLayers"]);
 	layerPalette->installEventFilter(this);
 
 	// Scrapbook
 	scrapbookPalette = dockManager->scrapbookPalette;
-	connect( scrActions["toolsScrapbook"], SIGNAL(toggled(bool)) , scrapbookPalette, SLOT(toggleView(bool)));
-	connect( scrapbookPalette, SIGNAL(viewToggled(bool)), scrActions["toolsScrapbook"], SLOT(setChecked(bool)));
+	scrapbookPalette->setToggleViewAction(scrActions["toolsScrapbook"]);
 	connect( scrapbookPalette, SIGNAL(pasteToActualPage(QString)), this, SLOT(pasteFromScrapbook(QString)));
 	connect( scrapbookPalette, SIGNAL(scrapbookListChanged()), this, SLOT(rebuildScrapbookMenu()));
 	scrapbookPalette->installEventFilter(this);
@@ -739,14 +734,12 @@
 	// Pages
 	pagePalette = dockManager->pagePalette;
 	pagePalette->setMainWindow(this);
-	connect( scrActions["toolsPages"], SIGNAL(toggled(bool)) , pagePalette, SLOT(toggleView(bool)) );
-	connect( pagePalette, SIGNAL(viewToggled(bool)), scrActions["toolsPages"], SLOT(setChecked(bool)));
+	pagePalette->setToggleViewAction(scrActions["toolsPages"]);
 	pagePalette->installEventFilter(this);
 
 	// Bookmark
 	bookmarkPalette = dockManager->bookPalette;
-	connect( scrActions["toolsBookmarks"], SIGNAL(toggled(bool)) , bookmarkPalette, SLOT(toggleView(bool)) );
-	connect( bookmarkPalette, SIGNAL(viewToggled(bool)), scrActions["toolsBookmarks"], SLOT(setChecked(bool)));
+	bookmarkPalette->setToggleViewAction(scrActions["toolsBookmarks"]);
 	bookmarkPalette->installEventFilter(this);
 
 	// Downloads
@@ -767,8 +760,7 @@
 
 	// Align & Distribute
 	alignDistributePalette = dockManager->alignDistributePalette;
-	connect( scrActions["toolsAlignDistribute"], SIGNAL(toggled(bool)) , alignDistributePalette, SLOT(toggleView(bool)) );
-	connect( alignDistributePalette, SIGNAL(viewToggled(bool)), scrActions["toolsAlignDistribute"], SLOT(setChecked(bool)));
+	alignDistributePalette->setToggleViewAction(scrActions["toolsAlignDistribute"]);
 	connect( alignDistributePalette, SIGNAL(documentChanged()), this, SLOT(slotDocCh()));
 	alignDistributePalette->installEventFilter(this);
 
@@ -775,8 +767,7 @@
 	// Symbols
 	symbolPalette = dockManager->symbolPalette;
 	symbolPalette->setMainWindow(this);
-	connect(scrActions["toolsSymbols"], SIGNAL(toggled(bool)), symbolPalette, SLOT(toggleView(bool)) );
-	connect(symbolPalette, SIGNAL(viewToggled(bool)), scrActions["toolsSymbols"], SLOT(setChecked(bool)));
+	symbolPalette->setToggleViewAction(scrActions["toolsSymbols"]);
 	connect(symbolPalette, SIGNAL(startEdit(QString)), this, SLOT(editSymbolStart(QString)));
 	connect(symbolPalette, SIGNAL(endEdit()), this, SLOT(editSymbolEnd()));
 	connect(symbolPalette, SIGNAL(objectDropped()), this, SLOT(PutToPatterns()));
@@ -785,8 +776,7 @@
 	// Inline Elements
 	inlinePalette = dockManager->inlinePalette;
 	inlinePalette->setMainWindow(this);
-	connect(scrActions["toolsInline"], SIGNAL(toggled(bool)), inlinePalette, SLOT(toggleView(bool)) );
-	connect(inlinePalette, SIGNAL(viewToggled(bool)), scrActions["toolsInline"], SLOT(setChecked(bool)));
+	inlinePalette->setToggleViewAction(scrActions["toolsInline"]);
 	connect(inlinePalette, SIGNAL(startEdit(int)), this, SLOT(editInlineStart(int)));
 	connect(inlinePalette, SIGNAL(endEdit()), this, SLOT(editInlineEnd()));
 	connect(inlinePalette, SIGNAL(objectDropped(QString)), this, SLOT(PutToInline(QString)));
@@ -794,9 +784,9 @@
 
 	// Undo
 	undoPalette = dockManager->undoPalette;
+	undoPalette->setToggleViewAction(scrActions["toolsActionHistory"]);
 	undoPalette->installEventFilter(this);
 	m_undoManager->registerGui(undoPalette);
-	connect(undoPalette, SIGNAL(viewToggled(bool)), this, SLOT(setUndoPalette(bool)));
 	connect(undoPalette, SIGNAL(objectMode(bool)), this, SLOT(setUndoMode(bool)));
 
 	// initializing style manager here too even it's not strictly a palette
@@ -5448,52 +5438,19 @@
 	if (m_palettesStatus[PAL_ALL])
 	{
 		m_palettesStatus[PAL_ALL] = false;
-//		if (m_palettesStatus[PAL_PROPERTIES])
-//			propertiesPalette->toggleView(true);
-//		if (m_palettesStatus[PAL_CONTENT])
-//			contentPalette->toggleView(true);
-//		if (m_palettesStatus[PAL_OUTLINE])
-//			outlinePalette->toggleView(true);
-//		if (m_palettesStatus[PAL_SCRAPBOOK])
-//			scrapbookPalette->toggleView(true);
-//		if (m_palettesStatus[PAL_LAYER])
-//			layerPalette->toggleView(true);
-//		if (m_palettesStatus[PAL_PAGE])
-//			pagePalette->toggleView(true);
-//		if (m_palettesStatus[PAL_BOOKMARK])
-//			bookmarkPalette->toggleView(true);
+
 		if (m_palettesStatus[PAL_VERIFIER])
 			docCheckerPalette->show();
 		if (m_palettesStatus[PAL_DOWNLOADS])
 			downloadsPalette->show();
-//		if (m_palettesStatus[PAL_ALIGNDISTRIBUTE])
-//			alignDistributePalette->toggleView(true);
-//		setUndoPalette(m_palettesStatus[PAL_UNDO]);
 	}
 	else
 	{
-//		m_palettesStatus[PAL_PROPERTIES] = !propertiesPalette->isClosed();
-//		m_palettesStatus[PAL_CONTENT] = !contentPalette->isClosed();
-//		m_palettesStatus[PAL_OUTLINE] = !outlinePalette->isClosed();
-//		m_palettesStatus[PAL_SCRAPBOOK] = !scrapbookPalette->isClosed();
-//		m_palettesStatus[PAL_LAYER] = !layerPalette->isClosed();
-//		m_palettesStatus[PAL_PAGE] = !pagePalette->isClosed();
-//		m_palettesStatus[PAL_BOOKMARK] = !bookmarkPalette->isClosed();
-//		m_palettesStatus[PAL_UNDO] = !undoPalette->isClosed();
 		m_palettesStatus[PAL_VERIFIER] = docCheckerPalette->isVisible();
 		m_palettesStatus[PAL_DOWNLOADS] = downloadsPalette->isVisible();
-//		m_palettesStatus[PAL_ALIGNDISTRIBUTE] = !alignDistributePalette->isClosed();
-//		propertiesPalette->toggleView(false);
-//		contentPalette->toggleView(false);
-//		outlinePalette->toggleView(false);
-//		scrapbookPalette->toggleView(false);
-//		bookmarkPalette->toggleView(false);
-//		pagePalette->toggleView(false);
-//		layerPalette->toggleView(false);
+
 		docCheckerPalette->hide();
 		downloadsPalette->hide();
-//		alignDistributePalette->toggleView(false);
-//		setUndoPalette(false);
 		m_palettesStatus[PAL_ALL] = true;
 	}
 }
@@ -5503,23 +5460,11 @@
 	m_palettesStatus[PAL_ALL] = false;
 }
 
-void ScribusMainWindow::setUndoPalette(bool visible)
-{
-	undoPalette->toggleView(visible);
-	scrActions["toolsActionHistory"]->setChecked(visible);
-}
-
 void ScribusMainWindow::togglePagePalette()
 {
 	m_palettesStatus[PAL_ALL] = false;
 }
 
-void ScribusMainWindow::toggleUndoPalette()
-{
-	setUndoPalette(undoPalette->isClosed());
-	m_palettesStatus[PAL_ALL] = false;
-}
-
 void ScribusMainWindow::toggleImageVisibility()
 {
 	if (!doc)
Index: scribus/scribus.h
===================================================================
--- scribus/scribus.h	(Revision 26724)
+++ scribus/scribus.h	(Arbeitskopie)
@@ -455,8 +455,6 @@
 	void toggleRulers();
 	void toggleRulerMode();
 	void togglePagePalette();
-	void toggleUndoPalette();
-	void setUndoPalette(bool visible);
 	void toggleCheckPal();
 	/** \brief Schaltet M_ViewShowImages ein/aus */
 	void toggleImageVisibility();
palettevis_2025-02-23_02.patch (12,302 bytes)   

ale

2025-02-24 19:31

manager   ~0052111

perfect!

yes, when the palette are docked, this is the behavior that i want : - )

currently, i cannot test what happens when they are floating, since i have a nasty bug with ADS that messes up the palette when i detach it (i checked it with the demo app from ADS and it happens also there; if i can't find a solution i will open a ticket @ ADS, but first i have to test a few more things!).

nitramr

2025-02-24 19:45

developer   ~0052113

On my system I have no problems. If a palette is floating and I select the corresponding menu item, it becomes active. If it is floating and closed and I select the menu item, it appears as expected.

About the ADS issues you have, is it Wayland related?

ale

2025-02-24 21:31

manager   ~0052115

I don't have Wayland, but a minimal tiling window manager (dwm).

I might need to add a setting for the window manager, or there is indeed something wrong.

Before raising the issue, I want to install and try a different (less minimal) tiling WM and see if it happens also there.

The issue is that the panel gets full screen , with a gray background, artifacts in the display and it's not possible to dock it again.
I won't try it right now, since the only way to get back to a usable interface is to remove the settings. (or go back to a backup)

But that's a different issue than what we're discussing here : - )

Issue History

Date Modified Username Field Change
2025-02-15 06:43 ale New Issue
2025-02-15 06:51 ale Note Added: 0052056
2025-02-22 16:04 ale Note Added: 0052105
2025-02-23 15:42 nitramr Note Added: 0052106
2025-02-23 15:42 nitramr File Added: palettevis_2025-02-23_01.patch
2025-02-23 16:43 nitramr Patch No => Yes
2025-02-23 19:09 ale Note Added: 0052107
2025-02-23 19:09 ale File Added: f2-f3.gif
2025-02-23 19:28 nitramr Note Added: 0052108
2025-02-23 19:28 nitramr File Added: palettevis_2025-02-23_02.patch
2025-02-24 19:31 ale Note Added: 0052111
2025-02-24 19:45 nitramr Note Added: 0052113
2025-02-24 21:31 ale Note Added: 0052115