Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix docker toggling in text tool options.

Wolthera van Hövell tot Westerfliercd0e07e7db96
diff --git a/plugins/tools/svgtexttool/SvgTextTool.cpp b/plugins/tools/svgtexttool/SvgTextTool.cpp
index da6c6a9aae..82d4b40114 100644
--- a/plugins/tools/svgtexttool/SvgTextTool.cpp
+++ b/plugins/tools/svgtexttool/SvgTextTool.cpp
@@ -218,7 +218,11 @@ QWidget *SvgTextTool::createOptionWidget()
m_optionManager->setShowTextPropertyButton((docker));
if (docker) {
optionWidget->setPalette(docker->palette());
- connect(m_optionManager.data(), SIGNAL(openTextPropertiesDocker(bool)), docker, SLOT(setVisible(bool)));
+ m_optionManager->setTextPropertiesOpen(docker->isVisible());
+ connect(m_optionManager.data(), &SvgTextToolOptionsManager::openTextPropertiesDocker, [docker](){
+ docker->setVisible(!docker->isVisible());
+ });
+ // Once we have docker toggling actions, we should revisit this.
}
}
slotUpdateVisualCursor();
diff --git a/plugins/tools/svgtexttool/SvgTextToolOptions.qml b/plugins/tools/svgtexttool/SvgTextToolOptions.qml
index 4928dac870..be510c9b6a 100644
--- a/plugins/tools/svgtexttool/SvgTextToolOptions.qml
+++ b/plugins/tools/svgtexttool/SvgTextToolOptions.qml
@@ -42,13 +42,6 @@ Control {
function onCssStylePresetNameChanged() {
updatePresetName();
}
- function onUseCurrentTextPropertiesChanged() {
- chkCurrentProperties.checked = manager.optionsModel.useCurrentTextProperties;
- }
- }
-
- function updateTextProperties() {
- btnTextProperties.checked = manager.textPropertiesOpen;
}
function updatePresetName() {
@@ -115,10 +108,10 @@ Control {
Button {
id: btnTextProperties;
text: i18nc("@label:button", "Open Text Properties");
- checkable: true;
+ checkable: false;
hoverEnabled: true;
- onCheckedChanged: {
- manager.textPropertiesOpen = checked;
+ onClicked: {
+ manager.textPropertiesOpen = !manager.textPropertiesOpen;
}
visible: manager.showTextPropertyButton;
height: visible? implicitHeight: 0;