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

Panel visual improvements #2261

Merged
merged 3 commits into from Nov 7, 2022
Merged

Panel visual improvements #2261

merged 3 commits into from Nov 7, 2022

Conversation

emilk
Copy link
Owner

@emilk emilk commented Nov 7, 2022

Before

panel-framing-before

After

panel-framing-after

@emilk emilk merged commit 4aacb45 into master Nov 7, 2022
@emilk emilk deleted the panel-improvements branch November 7, 2022 23:34
emilk added a commit that referenced this pull request Nov 7, 2022
@trivigy
Copy link

trivigy commented Nov 21, 2022

@emilk This commit creates a regression bug. Because of this (https://github.com/emilk/egui/pull/2261/files#diff-1b1b7f67a664568e1201e4336ca926fa687c506ffaaf2f237a21a1fa4619fab7L715) change, TopBottomPanel forces every usecase to always have a seperator hline irrelevant with regards to .resizable(false) or .frame(Frame { stroke: Stroke::none(), ..Frame::none() }). Those are simply ignored. Prior to this change those were configurable. Should this may be made configurable and still remaining inline with this change to improve the double (stroke + hline) issue?!

Current workaround:

let default_style = ctx.style();
let mut temporary_style = ctx.style().deref().clone();
temporary_style.visuals.widgets.noninteractive.bg_stroke = Stroke::none();
ctx.set_style(temporary_style);
egui::TopBottomPanel::top("top_inset_space")
  .frame(Frame {
    fill: ctx.style().visuals.window_fill(),
    shadow: Shadow::small_dark(),
    ..Frame::none()
  })
  .min_height(insets.top)
  .resizable(false)
  .show(&ctx, |_| {});
ctx.set_style(default_style);

emilk added a commit that referenced this pull request Dec 5, 2022
So as not to force it onto all users since #2261
@emilk
Copy link
Owner Author

emilk commented Dec 5, 2022

@trivigy good catch. Fixed in df01db2 - you can now set panel.show_separator_line(false) to get the old behavior back

JohannesProgrammiert pushed a commit to JohannesProgrammiert/egui that referenced this pull request Jan 21, 2023
* Remove stroke around panels and replace with separator single line

* Remove item_spacing between panels

* Update changelog
JohannesProgrammiert pushed a commit to JohannesProgrammiert/egui that referenced this pull request Jan 21, 2023
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.

None yet

2 participants