mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 14:49:06 -04:00
Rename Context::style to global_style; avoid confusion w/ Ui::style (#7772)
This is important after * https://github.com/emilk/egui/pull/7770
This commit is contained in:
@@ -181,7 +181,7 @@ impl Keypad {
|
||||
|
||||
let is_first_show = ctx.wants_keyboard_input() && state.focus != focus;
|
||||
if is_first_show {
|
||||
let y = ctx.style().spacing.interact_size.y * 1.25;
|
||||
let y = ctx.global_style().spacing.interact_size.y * 1.25;
|
||||
state.open = true;
|
||||
state.start_pos = ctx.input(|i| {
|
||||
i.pointer
|
||||
|
||||
@@ -46,9 +46,9 @@ fn custom_window_frame(ctx: &egui::Context, title: &str, add_contents: impl FnOn
|
||||
use egui::{CentralPanel, UiBuilder};
|
||||
|
||||
let panel_frame = egui::Frame::new()
|
||||
.fill(ctx.style().visuals.window_fill())
|
||||
.fill(ctx.global_style().visuals.window_fill())
|
||||
.corner_radius(10)
|
||||
.stroke(ctx.style().visuals.widgets.noninteractive.fg_stroke)
|
||||
.stroke(ctx.global_style().visuals.widgets.noninteractive.fg_stroke)
|
||||
.outer_margin(1); // so the stroke is within the bounds
|
||||
|
||||
CentralPanel::default().frame(panel_frame).show(ctx, |ui| {
|
||||
|
||||
@@ -113,7 +113,7 @@ fn preview_files_being_dropped(ctx: &egui::Context) {
|
||||
content_rect.center(),
|
||||
Align2::CENTER_CENTER,
|
||||
text,
|
||||
TextStyle::Heading.resolve(&ctx.style()),
|
||||
TextStyle::Heading.resolve(&ctx.global_style()),
|
||||
Color32::WHITE,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user