Re: More questions about statusbar menu
Le 05/09/2022 à 15:33, Jürgen Spitzmüller a écrit : Am Montag, dem 05.09.2022 um 14:58 +0200 schrieb Jean-Marc Lasgouttes: I think I went with the statusbar variant for space reasons. Would you advise using this everywhere? Yes. Done. Comments welcome. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: More questions about statusbar menu
Le 08/09/2022 à 07:45, Daniel a écrit : Further zoom options are available in both Word and Writer by pressing the zoom value. I suggest we just use the same (standard) mechanism. Stopping short of creating a dialog, I suggest to just show a menu as in the attached patch. I like it. I pushed it to master, so that people can play with it. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: More questions about statusbar menu
On 2022-09-08 07:15, Daniel wrote: On 2022-09-05 12:36, Jean-Marc Lasgouttes wrote: Le 05/09/2022 à 12:26, Jean-Marc Lasgouttes a écrit : Do as you see fit. I did, but I have more questions now. PS: I realize that I should have read tickets #12182 and #12187 before posting point 3/. I do not want to initiate an endless discussion about these things :) It is just that I noticed this while looking at the statistics thing. 3/ The contextual menu is a weird merge of what LibreOffice and MS Office do: * LO: each element has its menu, the zoom menu has example values to set (fit width, fit page, 50%, 75%, etc.), no way to tell which statistics should be there * MSO: only one menu with checkboxes to indicate which elements should be shown, no way to tell which statistics should be there, no way to set zoom from menu * LyX one menu that does both selection of elements and zooming, zoom in/out and reset to default (main use IMO is to learn shortcuts), weird-looking precomputed zoom values I understand that splitting the menu would make zoom menu unavailable when both count and slider are off; some solution would be needed if splitting the menus. OTOH I am not sure that the zoom menu is useful, except maybe for the reset to default, which is not available via a mouse click. In this respect, I like the Firefox approach, where clicking on the zoom indicator resets zoom to default. I don't remember that splitting menus was suggested yet at #12182 and #12187. (Feel free to ignore my comment otherwise.) I seem to remember that I suggested the whole status bar menu originally. Back then, there were was only zoom options which made it rather unproblematic to show zoom stuff on there. But now that more options were added (and probably not the last ones), I agree that it should be split up. Further zoom options are available in both Word and Writer by pressing the zoom value. I suggest we just use the same (standard) mechanism. Stopping short of creating a dialog, I suggest to just show a menu as in the attached patch. (By the way, setting 100% zoom to be actual zoom as suggested elsewhere might partly help with the number strangeness - at least as long as the default zoom is not changed.) Sorry, slightly improved version attached. (The pressed signal was previously also emitted on right click which interfered with the context menu event.) Daniel From c5daa4cbb8c1c2191ab07877d70820572ebbf2af Mon Sep 17 00:00:00 2001 From: Daniel Ramoeller Date: Thu, 8 Sep 2022 07:44:15 +0200 Subject: [PATCH] Disentangle status bar and zoom menu - Moves the zoom menu to the zoom value --- lib/ui/stdcontext.inc | 9 +++-- src/frontends/qt/GuiClickableLabel.cpp | 7 ++- src/frontends/qt/GuiClickableLabel.h | 2 ++ src/frontends/qt/GuiView.cpp | 14 -- src/frontends/qt/GuiView.h | 4 +++- 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index eb44a58f30..b9a23040c6 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -723,12 +723,17 @@ Menuset Item "Giant-sized Icons" "icon-size giant" End +# +# Status bar zoom context menu +# + Menu "context-zoom" + ZoomOptions + End + # # Status bar context menu # Menu "context-statusbar" - ZoomOptions - Separator Item "Zoom Level|Z" "ui-toggle zoomlevel" Item "Zoom Slider|S" "ui-toggle zoomslider" Separator diff --git a/src/frontends/qt/GuiClickableLabel.cpp b/src/frontends/qt/GuiClickableLabel.cpp index 311755d130..bad90f3b8e 100644 --- a/src/frontends/qt/GuiClickableLabel.cpp +++ b/src/frontends/qt/GuiClickableLabel.cpp @@ -11,7 +11,7 @@ #include "GuiClickableLabel.h" -#include +#include namespace lyx { namespace frontend { @@ -23,6 +23,11 @@ GuiClickableLabel::GuiClickableLabel(QWidget * parent) GuiClickableLabel::~GuiClickableLabel() {} +void GuiClickableLabel::mousePressEvent(QMouseEvent * e) { + if (e->button() == Qt::LeftButton) + Q_EMIT pressed(); +} + void GuiClickableLabel::mouseReleaseEvent(QMouseEvent *) { Q_EMIT clicked(); } diff --git a/src/frontends/qt/GuiClickableLabel.h b/src/frontends/qt/GuiClickableLabel.h index b14ba15de8..2fb4e8e25e 100644 --- a/src/frontends/qt/GuiClickableLabel.h +++ b/src/frontends/qt/GuiClickableLabel.h @@ -25,8 +25,10 @@ public: Q_SIGNALS: void clicked(); + void pressed(); protected: + void mousePressEvent(QMouseEvent *) override; void mouseReleaseEvent(QMouseEvent *) override; }; diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index b87b494dac..24d6703e30 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -706,7 +706,8 @@ GuiView::GuiView(int id) // QPalette palette = statusBar()->palette(
Re: More questions about statusbar menu
On 2022-09-05 12:36, Jean-Marc Lasgouttes wrote: Le 05/09/2022 à 12:26, Jean-Marc Lasgouttes a écrit : Do as you see fit. I did, but I have more questions now. PS: I realize that I should have read tickets #12182 and #12187 before posting point 3/. I do not want to initiate an endless discussion about these things :) It is just that I noticed this while looking at the statistics thing. 3/ The contextual menu is a weird merge of what LibreOffice and MS Office do: * LO: each element has its menu, the zoom menu has example values to set (fit width, fit page, 50%, 75%, etc.), no way to tell which statistics should be there * MSO: only one menu with checkboxes to indicate which elements should be shown, no way to tell which statistics should be there, no way to set zoom from menu * LyX one menu that does both selection of elements and zooming, zoom in/out and reset to default (main use IMO is to learn shortcuts), weird-looking precomputed zoom values I understand that splitting the menu would make zoom menu unavailable when both count and slider are off; some solution would be needed if splitting the menus. OTOH I am not sure that the zoom menu is useful, except maybe for the reset to default, which is not available via a mouse click. In this respect, I like the Firefox approach, where clicking on the zoom indicator resets zoom to default. I don't remember that splitting menus was suggested yet at #12182 and #12187. (Feel free to ignore my comment otherwise.) I seem to remember that I suggested the whole status bar menu originally. Back then, there were was only zoom options which made it rather unproblematic to show zoom stuff on there. But now that more options were added (and probably not the last ones), I agree that it should be split up. Further zoom options are available in both Word and Writer by pressing the zoom value. I suggest we just use the same (standard) mechanism. Stopping short of creating a dialog, I suggest to just show a menu as in the attached patch. (By the way, setting 100% zoom to be actual zoom as suggested elsewhere might partly help with the number strangeness - at least as long as the default zoom is not changed.) DanielFrom 468517474274a356746ab75afe0bdd76f95b0fad Mon Sep 17 00:00:00 2001 From: Daniel Ramoeller Date: Thu, 8 Sep 2022 07:04:07 +0200 Subject: [PATCH] Disentangle status bar and zoom menu - Moves the zoom menu to the zoom value --- lib/ui/stdcontext.inc | 9 +++-- src/frontends/qt/GuiClickableLabel.cpp | 4 src/frontends/qt/GuiClickableLabel.h | 2 ++ src/frontends/qt/GuiView.cpp | 14 -- src/frontends/qt/GuiView.h | 4 +++- 5 files changed, 28 insertions(+), 5 deletions(-) diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index eb44a58f30..b9a23040c6 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -723,12 +723,17 @@ Menuset Item "Giant-sized Icons" "icon-size giant" End +# +# Status bar zoom context menu +# + Menu "context-zoom" + ZoomOptions + End + # # Status bar context menu # Menu "context-statusbar" - ZoomOptions - Separator Item "Zoom Level|Z" "ui-toggle zoomlevel" Item "Zoom Slider|S" "ui-toggle zoomslider" Separator diff --git a/src/frontends/qt/GuiClickableLabel.cpp b/src/frontends/qt/GuiClickableLabel.cpp index 311755d130..f2c1cd4d52 100644 --- a/src/frontends/qt/GuiClickableLabel.cpp +++ b/src/frontends/qt/GuiClickableLabel.cpp @@ -23,6 +23,10 @@ GuiClickableLabel::GuiClickableLabel(QWidget * parent) GuiClickableLabel::~GuiClickableLabel() {} +void GuiClickableLabel::mousePressEvent(QMouseEvent *) { + Q_EMIT pressed(); +} + void GuiClickableLabel::mouseReleaseEvent(QMouseEvent *) { Q_EMIT clicked(); } diff --git a/src/frontends/qt/GuiClickableLabel.h b/src/frontends/qt/GuiClickableLabel.h index b14ba15de8..2fb4e8e25e 100644 --- a/src/frontends/qt/GuiClickableLabel.h +++ b/src/frontends/qt/GuiClickableLabel.h @@ -25,8 +25,10 @@ public: Q_SIGNALS: void clicked(); + void pressed(); protected: + void mousePressEvent(QMouseEvent *) override; void mouseReleaseEvent(QMouseEvent *) override; }; diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index b87b494dac..24d6703e30 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -706,7 +706,8 @@ GuiView::GuiView(int id) // QPalette palette = statusBar()->palette(); - zoom_value_ = new QLabel(statusBar()); + zoom_value_ = new GuiClickableLabel(statusBar()); + connect(zoom_value_, SIGNAL(pressed()), this, SLOT(showZoomContextMenu())); // zoom_value_->setPalette(palette); zoom_value_->setForegroundRole(statusBar()->foregroundRole()); zoom_value_->setFixedHeight(fm.height()); @@ -72
Re: More questions about statusbar menu
Am Montag, dem 05.09.2022 um 10:08 -0400 schrieb Scott Kostyshak: > I haven't been following this conversation but I just tested the > current > feature in master and have a question: currently the word count is > inaccurate during the delayed calculation. Instead of displaying the > old/inaccurate word count, would it be better to just display "?", > e.g., > "? Words" ? There are still things to sort out with this mechanism. -- Jürgen signature.asc Description: This is a digitally signed message part -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: More questions about statusbar menu
On Mon, Sep 05, 2022 at 02:58:31PM +0200, Jean-Marc Lasgouttes wrote: > Le 05/09/2022 à 14:54, Jürgen Spitzmüller a écrit : > > Am Montag, dem 05.09.2022 um 12:26 +0200 schrieb Jean-Marc Lasgouttes: > > > 1/ the word/char checkboxes, would "Count Words" be clearer than > > > "Word > > > Count" ? (I think about themes where checkbox is not visible when > > > off) > > > > To me, word count is more intuitive (as in: show word count). > > OK I agree that "word count" is more intuitive. "count words" sounds nice as a verb, but I don't think that's what we want here. "word count" sounds nice and I think it's commonly used. A related phrase that's commonly used is "head count". We take a head count when we want to count how many people there are (e.g., at school when we go outside during a fire drill). I haven't been following this conversation but I just tested the current feature in master and have a question: currently the word count is inaccurate during the delayed calculation. Instead of displaying the old/inaccurate word count, would it be better to just display "?", e.g., "? Words" ? Scott > > > 2/ we have to settle on wording: > > > statusbar: Characters (No Blanks) > > > statusbar menu: Character Count (Without Blanks) > > > statistics dialog: %1$d characters (excluding blanks) > > > > I think I went with the statusbar variant for space reasons. > > Would you advise using this everywhere? > > Thanks, > JMarc > > -- > lyx-devel mailing list > lyx-devel@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-devel signature.asc Description: PGP signature -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: More questions about statusbar menu
Am Montag, dem 05.09.2022 um 14:58 +0200 schrieb Jean-Marc Lasgouttes: > > I think I went with the statusbar variant for space reasons. > > Would you advise using this everywhere? Yes. -- Jürgen signature.asc Description: This is a digitally signed message part -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: More questions about statusbar menu
Le 05/09/2022 à 14:54, Jürgen Spitzmüller a écrit : Am Montag, dem 05.09.2022 um 12:26 +0200 schrieb Jean-Marc Lasgouttes: 1/ the word/char checkboxes, would "Count Words" be clearer than "Word Count" ? (I think about themes where checkbox is not visible when off) To me, word count is more intuitive (as in: show word count). OK 2/ we have to settle on wording: statusbar: Characters (No Blanks) statusbar menu: Character Count (Without Blanks) statistics dialog: %1$d characters (excluding blanks) I think I went with the statusbar variant for space reasons. Would you advise using this everywhere? Thanks, JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: More questions about statusbar menu
Am Montag, dem 05.09.2022 um 12:26 +0200 schrieb Jean-Marc Lasgouttes: > 1/ the word/char checkboxes, would "Count Words" be clearer than > "Word > Count" ? (I think about themes where checkbox is not visible when > off) To me, word count is more intuitive (as in: show word count). > 2/ we have to settle on wording: > statusbar: Characters (No Blanks) > statusbar menu: Character Count (Without Blanks) > statistics dialog: %1$d characters (excluding blanks) I think I went with the statusbar variant for space reasons. -- Jürgen signature.asc Description: This is a digitally signed message part -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
Re: More questions about statusbar menu
Le 05/09/2022 à 12:26, Jean-Marc Lasgouttes a écrit : Do as you see fit. I did, but I have more questions now. PS: I realize that I should have read tickets #12182 and #12187 before posting point 3/. I do not want to initiate an endless discussion about these things :) It is just that I noticed this while looking at the statistics thing. 1/ the word/char checkboxes, would "Count Words" be clearer than "Word Count" ? (I think about themes where checkbox is not visible when off) 2/ we have to settle on wording: statusbar: Characters (No Blanks) statusbar menu: Character Count (Without Blanks) statistics dialog: %1$d characters (excluding blanks) So, native English speakers, what is the right way to convey that we do not count blanks? 3/ The contextual menu is a weird merge of what LibreOffice and MS Office do: * LO: each element has its menu, the zoom menu has example values to set (fit width, fit page, 50%, 75%, etc.), no way to tell which statistics should be there * MSO: only one menu with checkboxes to indicate which elements should be shown, no way to tell which statistics should be there, no way to set zoom from menu * LyX one menu that does both selection of elements and zooming, zoom in/out and reset to default (main use IMO is to learn shortcuts), weird-looking precomputed zoom values I understand that splitting the menu would make zoom menu unavailable when both count and slider are off; some solution would be needed if splitting the menus. OTOH I am not sure that the zoom menu is useful, except maybe for the reset to default, which is not available via a mouse click. In this respect, I like the Firefox approach, where clicking on the zoom indicator resets zoom to default. So as you can see, lots of small questions. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel
More questions about statusbar menu
Le 01/09/2022 à 18:38, Jürgen Spitzmüller a écrit : Am Donnerstag, dem 01.09.2022 um 18:26 +0200 schrieb Jean-Marc Lasgouttes: A question concerning this menu: do we really have to keep the "Show" prefix for the different entries? In French, it becomes a bit long. In the View menu, there is no Show menu for the various panels. Another question: should we really display the three statistics by default, or could we skip characters without blanks like LibreOffice does. Finally, "Character Count (Incl. Blanks)" can be simplified to "Character Count" IMO. Do as you see fit. I did, but I have more questions now. 1/ the word/char checkboxes, would "Count Words" be clearer than "Word Count" ? (I think about themes where checkbox is not visible when off) 2/ we have to settle on wording: statusbar: Characters (No Blanks) statusbar menu:Character Count (Without Blanks) statistics dialog: %1$d characters (excluding blanks) So, native English speakers, what is the right way to convey that we do not count blanks? 3/ The contextual menu is a weird merge of what LibreOffice and MS Office do: * LO: each element has its menu, the zoom menu has example values to set (fit width, fit page, 50%, 75%, etc.), no way to tell which statistics should be there * MSO: only one menu with checkboxes to indicate which elements should be shown, no way to tell which statistics should be there, no way to set zoom from menu * LyX one menu that does both selection of elements and zooming, zoom in/out and reset to default (main use IMO is to learn shortcuts), weird-looking precomputed zoom values I understand that splitting the menu would make zoom menu unavailable when both count and slider are off; some solution would be needed if splitting the menus. OTOH I am not sure that the zoom menu is useful, except maybe for the reset to default, which is not available via a mouse click. In this respect, I like the Firefox approach, where clicking on the zoom indicator resets zoom to default. So as you can see, lots of small questions. JMarc -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel