Bug 32500 (GTK) - [META] GTK style doesn't draw some elements via GTK
Summary: [META] GTK style doesn't draw some elements via GTK
Status: NEW
Alias: GTK
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 46973 71219 84412 62396
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-18 11:27 UTC by Ruslan Kabatsayev
Modified: 2017-09-11 20:17 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
Implement menu separators (5.66 KB, text/plain)
2011-04-08 06:26 UTC, Michael Natterer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ruslan Kabatsayev 2010-12-18 11:27:01 UTC
Some elements in LibreOffice UI are drawn via native renderer, though GTK style is supposed to be used. This includes:
- Arrows and separators in menus and toolbars
- Checkboxes in toolbars
- Headers and borders of multiple-column lists (e.g. Tools->Customize->Events)
Comment 1 Jan Holesovsky 2010-12-21 08:23:24 UTC
This would actually be an interesting Easy Hack for somebody who has a bit of Gtk+ experience (not too much), and willingness to play with pixels :-)

Whoever interested, please contact me on the #libreoffice channel on irc.freenode.net (kendy) if you are interested in details.
Comment 2 Ruslan Kabatsayev 2010-12-30 13:34:15 UTC
Here're some more elements.

- listview selection rectangles
- (?) page scale slider in Writer
- shadows of document view
- formula entry in Calc
- splitters (the ones which are used to resize toolbars by dragging)

P.S.
> - Checkboxes in toolbars
I meant menus
Comment 3 Michael Meeks 2011-01-21 12:42:44 UTC
Some dump for archive from IRC:

the gtk+ native widget code lives in vcl/unx/gtk/source/*

it is easy to find: just do 'g grep gtk_' in the toplevel ;-)

you really need to read the salnativewidgets-gtk.cxx module, and the API that that uses.

the menu stuff (eg.) is quite simple - vcl/source/window/menu.cxx (probably) in there somewhere - and renders the spaces in quite a silly way no doubt at the moment :-)

I -think- the tooltips are tied into this "QuickHelp" concept in vcl/source/window/toolbox.cxx as in 'RequestHelp' eg.
Comment 4 Michael Meeks 2011-01-21 12:44:37 UTC
If you badly want to get native (curved) tooltip windows (and so on)

Perhaps the best way to get truly native menus/toolbars [ which would be cool ] would be to hack the 'framework/' code - that implements UNO interfaces for these - to create gtk+ widgets instead natively I suspect. But that is quite some work, and will need rather some re-factoring to share code [ which would be fun anyway ]
Comment 5 Michael Natterer 2011-04-08 06:26:01 UTC
Created attachment 45419 [details]
Implement menu separators

Attached patch gtk-natively draws menu separators.
Comment 6 Don't use this account, use tml@iki.fi 2011-04-12 03:07:32 UTC
Thanks, pushed to master.
Comment 7 Don't use this account, use tml@iki.fi 2011-04-12 03:08:43 UTC
Ah, was that patch just for a part of what is listed in the initial comment? Should this be re-opened?
Comment 8 Michael Natterer 2011-04-12 03:17:29 UTC
Yes, just one issue, bug needs to stay open.
Comment 9 Kristian Rietveld 2011-04-23 03:27:15 UTC
(In reply to comment #2)
> Here're some more elements.

Another element which does not follow GTK+ style: the combo boxes for Menu/Save In in tools->customize->menus and Toolbar/Save In in tools->customize->toolbars.  Note that the combo boxes/option menus for Menu/Toolbar and Modify seem to more closely resemble the GTK+ style.
Comment 10 Kristian Rietveld 2011-04-24 08:44:07 UTC
FWIW I am currently looking into drawing the headers of multiple-column lists via native renderer (almost done actually) and will look into listview selection rectangles after that.
Comment 11 Stefano Facchini 2011-06-08 04:39:22 UTC
(In reply to comment #9)
> 
> Another element which does not follow GTK+ style: the combo boxes for Menu/Save
> In in tools->customize->menus and Toolbar/Save In in
> tools->customize->toolbars.

Do you (or anyone else) know where is the source code for the "Customize" window? I'd like to try something on this but I can't locate a starting point. Maybe the framework/ directory, but where exactly?
Comment 12 Kristian Rietveld 2011-06-11 08:04:57 UTC
(In reply to comment #11)
> Do you (or anyone else) know where is the source code for the "Customize"
> window? I'd like to try something on this but I can't locate a starting point.
> Maybe the framework/ directory, but where exactly?

Try components/cui/source/customize.
Comment 13 Tomasz Sałaciński 2011-10-16 13:49:57 UTC
There are some other issues:

- Popup menus are drawn wrong (wrong size of items in menu)
- Rulers look very bad (see: http://luxperpetua.net/lo-screenshot.jpg). It seems it uses frame widget code, because frames in options dialog are bad too.
- Outline around button labels (no widget toolkit seems to be using that). See http://luxperpetua.net/lo-buttons.jpg

Except from that I can't see anything that would disrupt user from work. Does anyone know where is the GTK menu code and ruler/frame code?
Comment 14 Tomasz Sałaciński 2011-10-16 13:51:00 UTC
Maybe instead of custom dialogs Libreoffice could offer toolkit-specific dialog? GtkMessageDialog for instance for GTK?
Comment 15 Ruslan Kabatsayev 2011-10-19 07:48:45 UTC
Another element which looks quite alien is the "More buttons" button of toolbars (see this screenshot: http://i.imgur.com/wrIdl.png ).
I'm not sure how this could be themed, since there's no such widget in GTK, but there needs to be a way for the theme engine to detect this widget and draw it as it should. I'd suggest using g_object_set_data() with data set to a string which would easily identify this button, and key set to somthing like "LibreOffice.GTKStyle".
Comment 16 Michael Meeks 2012-05-08 13:39:15 UTC
Michael's patch got merged (or something like it), plenty more to do there though - pwrt. gtk3 :-)
Comment 17 Florian Reisinger 2012-05-18 09:55:57 UTC
Deleted "Easyhack" from summary.
Comment 18 Michael Stahl (CIB) 2012-07-05 07:08:06 UTC
Comment on attachment 45419 [details]
Implement menu separators

patch found pushed as 8311743913982b775e4791bd6ee3e5670cab1c16,
removing "patch" flag so it doesn't turn up in bugzilla searches.
Comment 19 Björn Michaelsen 2013-10-04 18:46:57 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 20 Adolfo Jayme 2014-07-03 06:59:09 UTC
As this bug’s scope isn’t narrow, I’m turning it into a metabug, adding more specific tasks to its “Depends on” field.
Comment 21 QA Administrators 2014-10-23 17:32:23 UTC
Please read this message in its entirety before responding.

Your bug was confirmed at least 1 year ago and has not had any activity on it for over a year. Your bug is still set to NEW which means that it is open and confirmed. It would be nice to have the bug confirmed on a newer version than the version reported in the original report to know that the bug is still present -- sometimes a bug is inadvertently fixed over time and just never closed.

If you have time please do the following:
1) Test to see if the bug is still present on a currently supported version of LibreOffice (preferably 4.2 or newer).
2) If it is present please leave a comment telling us what version of LibreOffice and your operating system.
3) If it is NOT present please set the bug to RESOLVED-WORKSFORME and leave a short comment telling us your version and Operating System

Please DO NOT
1) Update the version field
2) Reply via email (please reply directly on the bug tracker)
3) Set the bug to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists/. 

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Comment 22 Adolfo Jayme 2014-10-23 17:36:30 UTC
Dear QA bot: this bug is obviously still relevant ;-)
Comment 23 Joel Madero 2014-10-23 17:38:12 UTC
Yes - I'm an idiot, wrong query - SOB....apologies
Comment 24 Robinson Tryon (qubit) 2015-12-14 06:18:13 UTC
Migrating Whiteboard tags to Keywords: (easyHack, topicUI)
[NinjaEdit]
Comment 25 Björn Michaelsen 2016-01-26 17:26:39 UTC
removing skillLinux keyword. There is no such thing at https://wiki.documentfoundation.org/Development/Easy_Hacks/lists/by_Required_Skill and having a "skill*" keyword makes the easyHack not even appear on that page even in "uncategorized".
Comment 26 Samuel Mehrbrodt (CIB) 2016-02-02 11:39:23 UTC
removing EasyHack keywords as per comment 20.