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

Merged
merged 1 commit into from
Dec 21, 2024
Merged

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

The background color of the icon view is wrong.
When only one tab is open, it is the same color
as the toolbars.
@ib ib force-pushed the fix-gtk3-background branch from 75d3986 to fe9f46c Compare December 4, 2024 14:44
@ib
Copy link
Member

ib commented Dec 4, 2024

@livanh, are you okay with the merge and the resulting commit?

@ib ib added the question label Dec 6, 2024
@ib ib removed the question label Dec 21, 2024
@ib ib merged commit 37456d7 into lxde:master Dec 21, 2024
@ib
Copy link
Member

ib commented Dec 21, 2024

Thank you very much for your contribution.

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.

4 participants