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

Fix background color with GTK3 #75

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

livanh
Copy link
Contributor

@livanh livanh commented Mar 15, 2021

I tried building for gtk3, and the background color was wrong (it was the same as the toolbars - see attached picture, left side). This is how I fixed it (result on right side). I can make changes if required for merging.

image

@wb9688
Copy link
Contributor

wb9688 commented Mar 15, 2021

I also noticed this issue, though it only happens when you have a single tab open.

Edit: I can confirm that this indeed fixes the color of that background.

Btw another difference (not caused by your PR) I noticed in the GTK 3 version is that it doesn't have lines around the toolbar like the GTK 2 version has.

@@ -1878,6 +1878,16 @@ exo_icon_view_expose_event (GtkWidget *widget,

if (!gtk_cairo_should_draw_window (cr, priv->bin_window))
return FALSE;

/* draw a background according to the css theme */
style = gtk_widget_get_style_context (widget);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it should be not retrieved again at line 1993 with this addition, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, I just tried and it works the same. PR updated

#if GTK_CHECK_VERSION(3, 0, 0)
style = gtk_widget_get_style_context (widget);
#else
#if !GTK_CHECK_VERSION(3, 0, 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be moved above if to not leave it alone.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I should look twice before committing. Fixed

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

Successfully merging this pull request may close these issues.

3 participants