sonic-pi icon indicating copy to clipboard operation
sonic-pi copied to clipboard

Text size down is bound to Alt+Shift+- on Linux

Open mrvanes opened this issue 6 years ago • 2 comments

As the subject says, to downsize the editor text in 3.2.0-dev I need to use additional Shift which actually is _ and size up is broken in the opposite way, that is now Alt+=, wich is the "unshifted" + key.

mrvanes avatar Jul 20 '19 10:07 mrvanes

Addtionally, debug, cue and help pane let the text-size be changed using Ctrl-mousescroll, which would really also be helpful in the editor window.

mrvanes avatar Jul 20 '19 10:07 mrvanes

Might be related to this bug: https://bugreports.qt.io/browse/QTBUG-49023 And this question https://stackoverflow.com/questions/40681969/what-am-i-doing-wrong-when-making-this-shortcut

The following patch resolves my problem, but I don't know if you allways want to fallback to Qt defaults?

$ git diff
diff --git a/app/gui/qt/mainwindow.cpp b/app/gui/qt/mainwindow.cpp
index 35465753c..4a1b66480 100644
--- a/app/gui/qt/mainwindow.cpp
+++ b/app/gui/qt/mainwindow.cpp
@@ -3166,13 +3166,13 @@ void  MainWindow::createToolBar()
 
   // Font Size Increase
   textIncAct = new QAction(default_light_size_up_icon, tr("Text Size Up"), this);
-  textIncSc = new QShortcut(metaKey('+'), this, SLOT(zoomCurrentWorkspaceIn()));
+  textIncSc = new QShortcut(QKeySequence::ZoomIn, this, SLOT(zoomCurrentWorkspaceIn()));
   updateAction(textIncAct, textIncSc, tr("Increase Text Size"));
   connect(textIncAct, SIGNAL(triggered()), this, SLOT(zoomCurrentWorkspaceIn()));
 
   // Font Size Decrease
   textDecAct = new QAction(default_light_size_down_icon, tr("Text Size Down"), this);
-  textDecSc = new QShortcut(metaKey('-'), this, SLOT(zoomCurrentWorkspaceOut()));
+  textDecSc = new QShortcut(QKeySequence::ZoomOut, this, SLOT(zoomCurrentWorkspaceOut()));
   updateAction(textDecAct, textDecSc, tr("Decrease Text Size"));
   connect(textDecAct, SIGNAL(triggered()), this, SLOT(zoomCurrentWorkspaceOut()));

mrvanes avatar Jul 20 '19 15:07 mrvanes