spacing for the GUI wokspace viewer

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

spacing for the GUI wokspace viewer

John W. Eaton
Administrator
The spacing around items in the workspace viewer seems too large,
especially when compared to the spacing around the items in either the
file browser or command history windows.  Does anyone know how to modify
the appearance of the workspace viewer to more closely match the file
browser and command history windows?

jwe
Reply | Threaded
Open this post in threaded view
|

Re: spacing for the GUI wokspace viewer

Daniel Sebald
On 04/11/2013 01:26 PM, John W. Eaton wrote:
> The spacing around items in the workspace viewer seems too large,
> especially when compared to the spacing around the items in either the
> file browser or command history windows. Does anyone know how to modify
> the appearance of the workspace viewer to more closely match the file
> browser and command history windows?

The column size can be changed by dragging the markers in the title bar.
  Do you mean the spacing about and below lines is too great?

Dan
Reply | Threaded
Open this post in threaded view
|

Re: spacing for the GUI wokspace viewer

John W. Eaton
Administrator
On 04/11/2013 02:35 PM, Daniel J Sebald wrote:

> The column size can be changed by dragging the markers in the title bar.
> Do you mean the spacing about and below lines is too great?

I'm talking about the entries in the table, not the header.  It's like
there is padding around all the text.  Compare the spacing of the lines
in the workspace viewer to the lines in the history list.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: spacing for the GUI wokspace viewer

Daniel Sebald
On 04/11/2013 01:38 PM, John W. Eaton wrote:
> On 04/11/2013 02:35 PM, Daniel J Sebald wrote:
>
>> The column size can be changed by dragging the markers in the title bar.
>> Do you mean the spacing about and below lines is too great?
>
> I'm talking about the entries in the table, not the header. It's like
> there is padding around all the text. Compare the spacing of the lines
> in the workspace viewer to the lines in the history list.

The only difference I see is that there is more padding above and below
lines in the table.  The spacing before the contents is about the same.
  Spacing after can be changed via the marker.  That's what you mean, right?

Qt's scheme is that there is a "model" (the data), and a "view" which
handles displaying the model.  To adjust the amount of whitespace around
table entries is probably done inside "workspace-viewer.cc".

Dan
Reply | Threaded
Open this post in threaded view
|

Re: spacing for the GUI wokspace viewer

John W. Eaton
Administrator
On 04/11/2013 02:46 PM, Daniel J Sebald wrote:

> Qt's scheme is that there is a "model" (the data), and a "view" which
> handles displaying the model. To adjust the amount of whitespace around
> table entries is probably done inside "workspace-viewer.cc".

Yeah, I understand that, but I don't know how to do it, which is why I'm
asking.  Is it possible to adjust the spacing somehow?  I don't the
methods to do it.  I thought some Qt expert here would see immediately
what needs to be done.

The following did not seem to work for me.


diff --git a/libgui/src/workspace-view.cc b/libgui/src/workspace-view.cc
--- a/libgui/src/workspace-view.cc
+++ b/libgui/src/workspace-view.cc
@@ -44,6 +44,11 @@
    view = new QTableView (this);

    view->setWordWrap (false);
+  view->setShowGrid (false);
+  view->setAlternatingRowColors (true);
+  view->resizeColumnsToContents ();
+  view->resizeRowsToContents ();
+  view->horizontalHeader()->setResizeMode (QHeaderView::Stretch);
    view->setContextMenuPolicy (Qt::CustomContextMenu);

    // Set an empty widget, so we can assign a layout to it.


jwe
Reply | Threaded
Open this post in threaded view
|

Re: spacing for the GUI wokspace viewer

Daniel Sebald
On 04/11/2013 01:59 PM, John W. Eaton wrote:

> On 04/11/2013 02:46 PM, Daniel J Sebald wrote:
>
>> Qt's scheme is that there is a "model" (the data), and a "view" which
>> handles displaying the model. To adjust the amount of whitespace around
>> table entries is probably done inside "workspace-viewer.cc".
>
> Yeah, I understand that, but I don't know how to do it, which is why I'm
> asking. Is it possible to adjust the spacing somehow? I don't the
> methods to do it. I thought some Qt expert here would see immediately
> what needs to be done.
>
> The following did not seem to work for me.

I'll give it a try.


> + view->resizeColumnsToContents ();
> + view->resizeRowsToContents ();

Looks interesting.  Not sure this is it though.  I'll investigate.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: spacing for the GUI wokspace viewer

Daniel Sebald
On 04/11/2013 02:25 PM, Daniel J Sebald wrote:

> On 04/11/2013 01:59 PM, John W. Eaton wrote:
>> On 04/11/2013 02:46 PM, Daniel J Sebald wrote:
>>
>>> Qt's scheme is that there is a "model" (the data), and a "view" which
>>> handles displaying the model. To adjust the amount of whitespace around
>>> table entries is probably done inside "workspace-viewer.cc".
>>
>> Yeah, I understand that, but I don't know how to do it, which is why I'm
>> asking. Is it possible to adjust the spacing somehow? I don't the
>> methods to do it. I thought some Qt expert here would see immediately
>> what needs to be done.
>>
>> The following did not seem to work for me.
>
> I'll give it a try.

https://savannah.gnu.org/patch/index.php?8010

Dan