Bug 61373 - VIEWING: Tabtext is displayed outside tabs with gtk oxygen theme
Summary: VIEWING: Tabtext is displayed outside tabs with gtk oxygen theme
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other Linux (All)
: medium minor
Assignee: Caolán McNamara
URL:
Whiteboard: BSA target:4.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-24 00:21 UTC by Francisco
Modified: 2013-02-26 19:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (183.92 KB, image/png)
2013-02-24 00:21 UTC, Francisco
Details
Screenshot after patch (31.89 KB, image/png)
2013-02-25 19:28 UTC, Ruslan Kabatsayev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francisco 2013-02-24 00:21:17 UTC
Created attachment 75431 [details]
Screenshot

Problem description: 
Using gtk2-oxygen engine for Gtk apps, many tabs of different part of Libreoffice, such as slide options in Impress or character properties (in any component), the text is sometimes rendered outside the tab frame.
The rest of Gtk programs show correct text on tabs.

I'm using Oxygen-Gtk 1.3.2.1, under Kubuntu 12.04.

Steps to reproduce:
1. Using Gtk-Oxygen engine for Gtk widgets
2. Open Impress or "Character dialog"


Current behavior:
Some tabs has text outside them

Expected behavior:
Tab's text should be inside tabs 
              
Operating System: Ubuntu
Version: 4.0.0.3 release
Comment 1 Nico Dorn 2013-02-24 10:51:36 UTC
Confirmed with LO 3.6.5.2, Oxygen-Gtk 1.3.0.0 on Kubuntu 12.10.
Comment 2 Jorendc 2013-02-24 14:44:48 UTC
I also can reproduce this behavior using Linux Mint 14 x64 with LibreOffice Version 4.1.0.0.alpha0+ (Build ID: 3eaa536ae457391c3826be50b0361f8d0c13cdd) (build yesterday).

I think this is due the dialog conversion using glade and .UI.

@Caolan: I suppose this is a known-issue but never reported before (as far I can see)?

Kind regards,
Joren
Comment 3 Caolán McNamara 2013-02-25 13:19:55 UTC
I'm not convinced there's any connection to the new .ui format, especially with "Confirmed with LO 3.6.5.2, Oxygen-Gtk 1.3.0.0 on Kubuntu 12.10." which doesn't have it. Presumably its something wrong with TabControl::ImplGetItemSize or (more likely I suppose) the GetNativeControlRegion effort to figure out what the theme would like for tab sizes
Comment 4 Caolán McNamara 2013-02-25 15:09:50 UTC
yeah, unrelated to widget layout.
Comment 5 Not Assigned 2013-02-25 15:13:29 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3094f6627f5925852a772754c067bfbb9491c94a

Resolves: fdo#61373 tabs too narrow under oxygen gtk theme



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Caolán McNamara 2013-02-25 15:16:24 UTC
caolanm->ivan/ruslan: you guys know the themeing stuff better than me. ^^^^ Right fix/better way ?
Comment 7 Ruslan Kabatsayev 2013-02-25 15:33:35 UTC
(In reply to comment #6)
> caolanm->ivan/ruslan: you guys know the themeing stuff better than me. ^^^^
> Right fix/better way ?

The patch looks good. Will test when I get to development machine.
Comment 8 Ruslan Kabatsayev 2013-02-25 19:28:51 UTC
Created attachment 75528 [details]
Screenshot after patch

@ Caolán McNamara
OK, I've checked how it looks, the sizes perfectly match height of tabs in true GTK apps.
Now what makes this not best is that tab labels are off center vertically. Could they be moved about 2px down?
Comment 9 Caolán McNamara 2013-02-26 11:32:39 UTC
was the text always vertically 2 pixels off, or has the new changed added this offset ?
Comment 10 Ruslan Kabatsayev 2013-02-26 19:07:50 UTC
(In reply to comment #9)
> was the text always vertically 2 pixels off, or has the new changed added
> this offset ?

Well, in fact if you look at first screenshot, you'll notice that the text is near top. But it's not noticeable too much because the tabs are broken with this bug. After solving this bug this offset makes impression of oversized tabs, which wasn't before because they were undersized (and are now in fact of perfect size).
Comment 11 Francisco 2013-02-26 19:37:05 UTC
Well, first of all, thank you for all your work :)

I have a simple question: Why this bug only affects Oxygen-GTK and not other themes?
Comment 12 Ruslan Kabatsayev 2013-02-26 19:47:26 UTC
(In reply to comment #11)
> I have a simple question: Why this bug only affects Oxygen-GTK and not other
> themes?

It's because oxygen-gtk's tabs need some space around tab button to render its prelight/shadow. Thus, instead of making a thin frame as most of other themes do, it shrinks actual widget look, but increases margins via {x,y}thickness gtkrc parameter. Thus, when LibO didn't respect that parameter, it failed to render oxygen-gtk correctly.