octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55795] Default Qt figure toolbar should use a


From: Rik
Subject: [Octave-bug-tracker] [bug #55795] Default Qt figure toolbar should use an uitoolbar
Date: Thu, 7 Mar 2019 19:48:42 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #8, bug #55795 (project octave):

I made a few small changes.  I eliminated some blank lines with trailing
spaces, I removed a file from module.mk that actually isn't there, and I
removed an extra separator at the start of the toolbar.


diff -r b776f4e2afab libgui/graphics/QtHandlesUtils.cc
--- a/libgui/graphics/QtHandlesUtils.cc Thu Mar 07 22:53:33 2019 +0100
+++ b/libgui/graphics/QtHandlesUtils.cc Thu Mar 07 16:39:08 2019 -0800
@@ -283,7 +283,7 @@ namespace QtHandles
     makeImageFromCData (const octave_value& v, int width, int height)
     {
       dim_vector dv (v.dims ());
-      
+
       if (dv.ndims () == 3 && dv(2) == 3)
         {
           int w = qMin (dv(1), static_cast<octave_idx_type> (width));
@@ -306,7 +306,7 @@ namespace QtHandles
                     int g = d(j, i, 1);
                     int b = d(j, i, 2);
                     int a = 255;
-                    
+
                     img.setPixel (x_off + i, y_off + j, qRgba (r, g, b, a));
                   }
             }
diff -r b776f4e2afab libgui/graphics/ToolBar.cc
--- a/libgui/graphics/ToolBar.cc        Thu Mar 07 22:53:33 2019 +0100
+++ b/libgui/graphics/ToolBar.cc        Thu Mar 07 16:39:08 2019 -0800
@@ -84,7 +84,6 @@ namespace QtHandles
   {
     uitoolbar::properties& tp = properties<uitoolbar> ();
 
-    
     bar->setFloatable (false);
     bar->setMovable (false);
     bar->setVisible (tp.is_visible ());
diff -r b776f4e2afab libgui/graphics/module.mk
--- a/libgui/graphics/module.mk Thu Mar 07 22:53:33 2019 +0100
+++ b/libgui/graphics/module.mk Thu Mar 07 16:39:08 2019 -0800
@@ -195,7 +195,6 @@ libgui_EXTRA_DIST += \
   %reldir%/images/pan.png \
   %reldir%/images/rotate.png \
   %reldir%/images/select.png \
-  %reldir%/images/text.png \
   %reldir%/images/zoom-in.png \
   %reldir%/images/zoom-out.png \
   $(__init_qt___UI)
diff -r b776f4e2afab scripts/plot/util/private/__add_default_menu__.m
--- a/scripts/plot/util/private/__add_default_menu__.m  Thu Mar 07 22:53:33
2019 +0100
+++ b/scripts/plot/util/private/__add_default_menu__.m  Thu Mar 07 16:39:08
2019 -0800
@@ -99,7 +99,7 @@ function __add_default_menu__ (hf, hmenu
 
     ht(1) = uitoggletool (htb, "tooltipstring", "Pan", ...
                           "tag", "__default_button_pan__", ...
-                          "__named_icon__", "figure-pan", "separator",
"on");
+                          "__named_icon__", "figure-pan");
     ht(2) = uitoggletool (htb, "tooltipstring", "Rotate", ...
                           "tag", "__default_button_rotate__", ...
                           "__named_icon__", "figure-rotate");


The new patch is uploaded.

My sense is that this is probably good enough to get checked in and then
resolve the remaining issues as they are exposed.

It would be good to have a UI expert comment, but I think we might need to add
a pointer icon for going back to regular click mode with no tools selected. 
You can do this by clicking on the tool that is currently selected which
toggles it, but I don't think that is how many people think.

Also, it seems from the code that we were not using 32x32 images in the past. 
It might be recommended by Qt, but I wonder how important it really is.  We
haven't gotten any complaints previously.


(file #46458)
    _______________________________________________________

Additional Item Attachment:

File name: qt_use_uitoolbar9.patch        Size:242 KB
    <https://savannah.gnu.org/file/qt_use_uitoolbar9.patch?file_id=46458>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55795>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]