[Top][All Lists]

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

[Octave-bug-tracker] [bug #53276] GUI: undocked panes cannot be moved, o

From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #53276] GUI: undocked panes cannot be moved, or resized along upper border
Date: Wed, 4 Apr 2018 17:45:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #76, bug #53276 (project octave):

@Torsten, @Rik: Attached is a new changeset version that should fix the
terminal color background.  It's actually a simple fix once I realized what
was happening, but it isn't a general fix which I'm not sure is possible.  I
added a portion of the cascading style sheet in 

diff --git a/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp
--- a/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp
+++ b/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp
@@ -188,6 +188,11 @@ void QUnixTerminalImpl::setBackgroundCol
+    QString css = QString ("TerminalView {\n"
+                           "  background: %1;\n"
+                           "}\n").arg (color.name ());
+    setStyleSheet (css);
 void QUnixTerminalImpl::setForegroundColor (const QColor& color)

Perhaps that negates the widget's QPalette::Window role, I don't know or if it
even matters.  There is a FIXME comment just above the function I altered, so
Torsten may want to review that hunk.

I suppose this is what "cascading" is about, but the reason one can't do
something general at the octave_dock_widget level (which is what


is doing) is that one sort of needs to know the object class type.  If I just
grab the background color from QDockWidget's perspective:

QPalette widgypal = widget()->palette();
QColor widgycol = widgypal.color(QPalette::Window);

I don't know if that QDockWidget is holding a TerminalView object, so one
would be setting the TerminalView background in a CSS description that is the
wrong color.  In some sense, the cascading style sheet is like virtual
functions (the compiler/Qt resolves them) except that in the CSS case all
levels are applied as opposed to over-riding.  We could attempt a generalized
approach by somehow grabbing the widget() class type and injecting that class
name in the octave_dock_widget level.  However, I think that is a rather
sophisticated algorithm along the lines of Qt's autoFillBackground algorithm. 

(file #43805)

Additional Item Attachment:

File name: octave-float_as_toplevel-djs2018apr04.patch Size:38 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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