WIP: layout compiling
This commit is contained in:
@@ -913,7 +913,7 @@ impl SearchableItem for Editor {
|
||||
fn update_matches(&mut self, matches: Vec<Range<Anchor>>, cx: &mut ViewContext<Self>) {
|
||||
self.highlight_background::<BufferSearchHighlights>(
|
||||
matches,
|
||||
|theme| theme.title_bar_background, // todo: update theme
|
||||
|theme| theme.search_match_background,
|
||||
cx,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -315,14 +315,11 @@ impl SelectionsCollection {
|
||||
|
||||
let line = display_map.layout_row(row, &text_layout_details);
|
||||
|
||||
dbg!("****START COL****");
|
||||
let start_col = line.closest_index_for_x(positions.start) as u32;
|
||||
if start_col < line_len || (is_empty && positions.start == line.width) {
|
||||
let start = DisplayPoint::new(row, start_col);
|
||||
dbg!("****END COL****");
|
||||
let end_col = line.closest_index_for_x(positions.end) as u32;
|
||||
let end = DisplayPoint::new(row, end_col);
|
||||
dbg!(start_col, end_col);
|
||||
|
||||
Some(Selection {
|
||||
id: post_inc(&mut self.next_selection_id),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use gpui::{AppContext, FontFeatures, Pixels};
|
||||
use gpui::{px, AbsoluteLength, AppContext, FontFeatures, Pixels};
|
||||
use schemars::JsonSchema;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::{collections::HashMap, path::PathBuf};
|
||||
@@ -114,12 +114,13 @@ pub enum TerminalLineHeight {
|
||||
}
|
||||
|
||||
impl TerminalLineHeight {
|
||||
pub fn value(&self) -> f32 {
|
||||
match self {
|
||||
pub fn value(&self) -> AbsoluteLength {
|
||||
let value = match self {
|
||||
TerminalLineHeight::Comfortable => 1.618,
|
||||
TerminalLineHeight::Standard => 1.3,
|
||||
TerminalLineHeight::Custom(line_height) => f32::max(*line_height, 1.),
|
||||
}
|
||||
};
|
||||
px(value).into()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -49,6 +49,8 @@ impl ThemeColors {
|
||||
tab_bar_background: neutral().light().step_2(),
|
||||
tab_active_background: neutral().light().step_1(),
|
||||
tab_inactive_background: neutral().light().step_2(),
|
||||
search_match_background: neutral().light().step_2(), // todo!(this was inserted by Mikayla)
|
||||
|
||||
editor_background: neutral().light().step_1(),
|
||||
editor_gutter_background: neutral().light().step_1(), // todo!("pick the right colors")
|
||||
editor_subheader_background: neutral().light().step_2(),
|
||||
@@ -121,6 +123,8 @@ impl ThemeColors {
|
||||
tab_bar_background: neutral().dark().step_2(),
|
||||
tab_active_background: neutral().dark().step_1(),
|
||||
tab_inactive_background: neutral().dark().step_2(),
|
||||
search_match_background: neutral().dark().step_2(), // todo!(this was inserted by Mikayla)
|
||||
|
||||
editor_background: neutral().dark().step_1(),
|
||||
editor_gutter_background: neutral().dark().step_1(),
|
||||
editor_subheader_background: neutral().dark().step_3(),
|
||||
|
||||
@@ -75,6 +75,8 @@ pub(crate) fn one_dark() -> Theme {
|
||||
tab_bar_background: bg,
|
||||
tab_inactive_background: bg,
|
||||
tab_active_background: editor,
|
||||
search_match_background: bg, // todo!(this was inserted by Mikayla)
|
||||
|
||||
editor_background: editor,
|
||||
editor_gutter_background: editor,
|
||||
editor_subheader_background: bg,
|
||||
@@ -92,6 +94,7 @@ pub(crate) fn one_dark() -> Theme {
|
||||
0.2,
|
||||
),
|
||||
editor_document_highlight_write_background: gpui::red(),
|
||||
|
||||
terminal_background: bg,
|
||||
// todo!("Use one colors for terminal")
|
||||
terminal_ansi_black: crate::black().dark().step_12(),
|
||||
|
||||
@@ -114,6 +114,7 @@ pub struct ThemeColors {
|
||||
pub tab_bar_background: Hsla,
|
||||
pub tab_inactive_background: Hsla,
|
||||
pub tab_active_background: Hsla,
|
||||
pub search_match_background: Hsla,
|
||||
// pub panel_background: Hsla,
|
||||
// pub pane_focused_border: Hsla,
|
||||
// /// The color of the scrollbar thumb.
|
||||
|
||||
Reference in New Issue
Block a user