Fix theme selector resetting the buffer size (#25425)
Closes https://github.com/zed-industries/zed/issues/25413 As the issue points out well, themes do not need to alter any in-memory state on load: that is done via settings file load. Originally, it was introduced in https://github.com/zed-industries/zed/pull/4064 and https://github.com/zed-industries/zed/pull/24857 had restored that behavior, which seems wrong to do. Apart from removing that part, removes unnecessary methods and emphasizes that in-memory state is the Buffer/UI size — no need to add `Adjusted` there as the settings file presence is already enough. Release Notes: - Fixed theme selector resetting the buffer size
This commit is contained in:
parent
822f42e8fe
commit
147f407b7a
5 changed files with 39 additions and 74 deletions
|
@ -13,7 +13,7 @@ use rope::Point;
|
|||
use settings::Settings;
|
||||
use std::time::Duration;
|
||||
use text::Bias;
|
||||
use theme::{get_ui_font_size, ThemeSettings};
|
||||
use theme::ThemeSettings;
|
||||
use ui::{
|
||||
prelude::*, ButtonLike, KeyBinding, PopoverMenu, PopoverMenuHandle, Switch, TintColor, Tooltip,
|
||||
};
|
||||
|
@ -369,7 +369,7 @@ 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: (-ThemeSettings::get_global(cx).ui_font_size(cx) * 2) - px(4.0),
|
||||
})
|
||||
.with_handle(self.inline_context_picker_menu_handle.clone()),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue