ui: Track changes to UI font size made via actions with settings (#23265)

Fixes #5380

Closes #5380

Release Notes:

- Font size changes made with actions are now persisted in user settings
This commit is contained in:
Piotr Osiewicz 2025-01-17 00:28:18 +01:00 committed by GitHub
parent 24495f09f9
commit 795376cb07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 89 additions and 156 deletions

View file

@ -11,7 +11,7 @@ use language_model::{LanguageModelRegistry, LanguageModelRequestTool};
use language_model_selector::LanguageModelSelector;
use rope::Point;
use settings::Settings;
use theme::{get_ui_font_size, ThemeSettings};
use theme::ThemeSettings;
use ui::{
prelude::*, ButtonLike, ElevationIndex, KeyBinding, PopoverMenu, PopoverMenuHandle, Switch,
};
@ -313,7 +313,11 @@ impl Render for MessageEditor {
.anchor(gpui::Corner::BottomLeft)
.offset(gpui::Point {
x: px(0.0),
y: (-get_ui_font_size(cx) * 2) - px(4.0),
y: px(-ThemeSettings::clamp_font_size(
ThemeSettings::get_global(cx).ui_font_size,
)
.0 * 2.0)
- px(4.0),
})
.with_handle(self.inline_context_picker_menu_handle.clone()),
)