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

Give the diagram a default "view" background #3042

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Jan 22, 2024

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

The contrast between the diagram and the side bar is a bit off, since both use the same background color.

What is the new behavior?

Use Adwaita's default "view" style as background for diagrams.

image

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added the python Pull requests that update Python code label Jan 22, 2024
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

PR Type: Enhancement

PR Summary: The pull request introduces a visual enhancement to the Gaphor application by applying a default 'view' background style to diagrams. This aims to improve the contrast between the diagram and the sidebar, addressing the issue of both elements using the same background color.

Decision: Comment

📝 Type: 'Enhancement' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.

General suggestions:

  • Verify that the new 'view' CSS class aligns with the existing project styling conventions and does not cause any unintended style conflicts with other UI components.
  • Consider providing a before-and-after comparison in the PR description to clearly illustrate the visual enhancement for reviewers.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -115,6 +115,7 @@ def construct(self):
scrolled_window = Gtk.ScrolledWindow()
scrolled_window.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
scrolled_window.set_child(view)
scrolled_window.add_css_class("view")
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (llm): Adding a CSS class to the scrolled_window is a good way to enhance the styling capabilities. Just ensure that the class name 'view' is consistent with the project's CSS naming conventions and that it doesn't inadvertently apply styles that conflict with other elements.

Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Great idea!

@danyeaw danyeaw merged commit 94aec34 into main Jan 23, 2024
19 checks passed
@danyeaw danyeaw deleted the diagram-background branch January 23, 2024 12:19
@danyeaw danyeaw added feature A new feature and removed python Pull requests that update Python code labels Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants