Update libcosmic and other dependencies
This commit is contained in:
parent
ec52d17303
commit
958b9298f3
3 changed files with 257 additions and 232 deletions
466
Cargo.lock
generated
466
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
12
src/main.rs
12
src/main.rs
|
|
@ -693,9 +693,11 @@ impl App {
|
|||
fn project_search(&self) -> Element<Message> {
|
||||
let spacing = self.core().system_theme().cosmic().spacing;
|
||||
|
||||
let search_input =
|
||||
widget::text_input::search_input(&fl!("project-search"), &self.project_search_value)
|
||||
.id(self.project_search_id.clone());
|
||||
let search_input = widget::text_input::search_input(
|
||||
fl!("project-search"),
|
||||
self.project_search_value.clone(),
|
||||
)
|
||||
.id(self.project_search_id.clone());
|
||||
|
||||
let items = match &self.project_search_result {
|
||||
Some(project_search_result) => {
|
||||
|
|
@ -1421,7 +1423,7 @@ impl Application for App {
|
|||
}
|
||||
Message::Quit => {
|
||||
//TODO: prompt for save?
|
||||
return window::close();
|
||||
return window::close(window::Id::MAIN);
|
||||
}
|
||||
Message::Redo => match self.active_tab() {
|
||||
Some(Tab::Editor(tab)) => {
|
||||
|
|
@ -1819,7 +1821,7 @@ impl Application for App {
|
|||
struct ThemeSubscription;
|
||||
|
||||
subscription::Subscription::batch([
|
||||
subscription::events_with(|event, _status| match event {
|
||||
event::listen_with(|event, _status| match event {
|
||||
event::Event::Keyboard(keyboard::Event::KeyPressed {
|
||||
modifiers,
|
||||
key_code,
|
||||
|
|
|
|||
|
|
@ -215,7 +215,12 @@ where
|
|||
Length::Fill
|
||||
}
|
||||
|
||||
fn layout(&self, _renderer: &Renderer, limits: &layout::Limits) -> layout::Node {
|
||||
fn layout(
|
||||
&self,
|
||||
_tree: &mut widget::Tree,
|
||||
_renderer: &Renderer,
|
||||
limits: &layout::Limits,
|
||||
) -> layout::Node {
|
||||
let limits = limits.width(Length::Fill).height(Length::Fill);
|
||||
|
||||
let mut editor = self.editor.lock().unwrap();
|
||||
|
|
@ -447,8 +452,7 @@ where
|
|||
|
||||
// This code comes from cosmic_text::LayoutRunIter
|
||||
let glyph_height = max_ascent + max_descent;
|
||||
let centering_offset =
|
||||
(metrics.line_height - glyph_height) / 2.0;
|
||||
let centering_offset = (metrics.line_height - glyph_height) / 2.0;
|
||||
let line_y = run.line_top + centering_offset + max_ascent;
|
||||
|
||||
for layout_glyph in layout_line.glyphs.iter() {
|
||||
|
|
@ -542,6 +546,7 @@ where
|
|||
image::Renderer::draw(
|
||||
renderer,
|
||||
handle.clone(),
|
||||
image::FilterMethod::Nearest,
|
||||
Rectangle::new(
|
||||
image_position,
|
||||
Size::new(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue