1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -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:
Emil Ernerfeldt
2025-12-14 16:41:13 +01:00
committed by GitHub
parent 5ea94dd0d7
commit bc48599f65
25 changed files with 94 additions and 58 deletions

View File

@@ -66,7 +66,7 @@ fn highlight_inner(
settings: Option<HighlightSettings<'_>>,
) -> LayoutJob {
// We take in both context and style so that in situations where ui is not available such as when
// performing it at a separate thread (ctx, ctx.style()) can be used and when ui is available
// performing it at a separate thread (ctx, ctx.global_style()) can be used and when ui is available
// (ui.ctx(), ui.style()) can be used
#[expect(non_local_definitions)]
@@ -301,7 +301,7 @@ impl CodeTheme {
///
/// There is one dark and one light theme stored at any one time.
pub fn store_in_memory(self, ctx: &egui::Context) {
let id = if ctx.style().visuals.dark_mode {
let id = if ctx.global_style().visuals.dark_mode {
egui::Id::new("dark")
} else {
egui::Id::new("light")