Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invisible tabs background & theme quirks under Adwaita/Gnome3 (Fedora & Arch Linux) #306

Closed
ThaisRobba opened this issue Apr 17, 2014 · 5 comments
Assignees
Labels

Comments

@ThaisRobba
Copy link

It seems to work fine under Gnome Ubuntu, which makes me think that they probably have a fallback theme or something like that.

There is also no scrollbar. I mean, it is there, it is clickable but it is completely invisible.

Here is a screenshot of how it looks under Fedora 20.
captura de tela de 2014-04-17 01 56 11

@pkulchenko pkulchenko self-assigned this Apr 17, 2014
@pkulchenko pkulchenko added the Bug label Apr 17, 2014
@pkulchenko
Copy link
Owner

wxwidgets uses lightness changes for the border by varying the value of the alpha channel in the color (making it a bit darker for the border). It seems like the changes in alpha channel don't work under Gnome3. I checked the code, but there is not much to see; for example, this sets border color: m_borderPen = wxPen(m_baseColour.ChangeLightness(75)); and the baseColour can be retrieved with something like this wx.wxSystemSettings:GetColour(wx.wxSYS_COLOUR_3DFACE):GetAsString(). This shows rgb(240, 240, 240) on my Windows machine.

I'm installing Fedora 20 to test this, but unfortunately I don't think it's something fixable on my side. I'm open to suggestions...

@ThaisRobba
Copy link
Author

I think Ubuntu Gnome fixes this by providing a fallback GTK theme - which really is out of the scope of ZB. Is Zerobrane currently built against GTK3 or GTK2?

That might be the issue: http://wxwidgets.10942.n7.nabble.com/Button-background-color-under-gtk3-and-wx-2-9-4-styles-and-other-issues-td35691.html

@pkulchenko
Copy link
Owner

I agree, it does seem relevant, although ZBS is compiled using GTK2. Still, this issue seems to be related to CSS-like GTK3 themes. Not sure yet what to do about it though; I don't see why changing lightness would fail with those themes as it only changes the color that is used to draw the border.

@pkulchenko
Copy link
Owner

@OttoRobba, it appears to be a combination of issues and it's not specific to ZBS. I found a very similar bug described here. It seems like there is something in those png files that are part of the theme that makes them failing to load by libpng 1.6.2 (this is the one shipped with ZBS). There are some reports that it works with 1.6.2, but there are also reports that it doesn't work on Fedora 20 with libpng 1.6.2 (and I just tested on that very version and it doesn't work for me).

For now the fix is to use a different scheme unfortunately (of "fix" the files in gtk-2.0 folder). As part of the upgrade I'm going to include libpng 1.6.10, but I'll need to test if it fixes the issue.

It's also possible to recompile ZBS on that platform; I'll check tomorrow if this helps.

@pkulchenko
Copy link
Owner

@OttoRobba, it should be possible to recompile ZBS on the platform where you are running it and it doesn't have that issue:

git clone https://github.com/pkulchenko/ZeroBraneStudio.git
cd ZeroBraneStudio/build
./build-linux.sh wxwidgets lua wxlua
cd ..
./zbstudio.sh

Strangely enough, this build is using the same version of libpng as the one included with ZBS (1.6.2) and the same version of zlib (as both are statically linked), but somehow it works when compiled on Fedora.

I'm closing this issue as there is not much else I can do until I'm recompiling this for wxwidgets upgrade (#260). Maybe it's using a newer version of GTK2 and that's why it works when recompiled, I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants