[bug #68462] TabBar should not display icons

"Dmitri A. Sergatskov" <[email protected]> Sat, 20 Jun 2026 14:48:09 -0400 (EDT)
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

URL:
  <https://savannah.gnu.org/bugs/?68462>

                 Summary: TabBar should not display icons
                   Group: GNU Octave
               Submitter: dasergatskov
               Submitted: Sat 20 Jun 2026 06:48:06 PM UTC
                Category: GUI
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name:
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Unlocked
                 Release: dev
        Operating System: Any
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 20 Jun 2026 06:48:06 PM UTC By: Dmitri A. Sergatskov <dasergatskov>
I have noticed that if I click "Windows" --> ""Reset Default
  Window Layout" the bottom TabBar labels now show Octave icons. 
I think that should not happen, only floating widget display icons. The
following diff seems to fix this for me:


--- a/libgui/src/main-window.cc Wed Jun 10 20:03:57 2026 +0200
+++ b/libgui/src/main-window.cc Sat Jun 20 14:44:01 2026 -0400
@@ -46,6 +46,7 @@
 #include <QScreen>
 #include <QStyle>
 #include <QStyleFactory>
+#include <QTabBar>
 #include <QTextBrowser>
 #include <QTextStream>
 #include <QThread>
@@ -3032,6 +3033,17 @@
   tabifyDockWidget (m_command_window, m_editor_window);
 #endif
 
+  // QMainWindow copies the floating-window icons into dock tabs when
+  // tabifying widgets.  Clear only its internal dock tab bars, leaving
+  // nested tab bars such as the editor's file tabs unchanged.
+  QList<QTabBar *> tab_bars
+    = findChildren<QTabBar *> (QString (), Qt::FindDirectChildrenOnly);
+  for (QTabBar *tab_bar : tab_bars)
+    {
+      for (int i = 0; i < tab_bar->count (); i++)
+        tab_bar->setTabIcon (i, QIcon ());
+    }
+
   // Resize command window, the important one in the default layout
   resize_dock (m_command_window, 2*win_x/3, -1);


Dmitri.
-- 








    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCajbgaQAKCRCqLAuaBUf3
TqGJAQCQ4h4LJXBRTdk9EVGxCj0kTmB/sz7H+v0Xas/XN8Jp1AEAmb2iunV9kTC4
RL6ActXp42QbKpGj6yXD8yue9DuRpQY=
=RtlQ
-----END PGP SIGNATURE-----