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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user