From fb7647c81338fe77c0bbf5301a158b29a5fdde90 Mon Sep 17 00:00:00 2001 From: unsecretised Date: Thu, 8 Jan 2026 15:44:32 +0800 Subject: [PATCH 1/2] This improves the styling for the search results --- src/app/apps.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/apps.rs b/src/app/apps.rs index f6f1b8e..fc97ea2 100644 --- a/src/app/apps.rs +++ b/src/app/apps.rs @@ -7,6 +7,7 @@ use iced::{ Alignment, Background, Length::Fill, alignment::Vertical, + border::Radius, widget::{Button, Row, Text, container, image::Viewer}, }; @@ -105,7 +106,7 @@ impl App { && let Some(icon) = &self.icons { tile = tile - .push(Viewer::new(icon).height(35).width(35)) + .push(container(Viewer::new(icon).height(35).width(35)).padding(5)) .align_y(Alignment::Center); } @@ -149,8 +150,15 @@ impl App { .style(|_| iced::widget::container::Style { text_color: Some(theme.text_color(1.)), background: Some(Background::Color(theme.bg_color())), + border: iced::Border { + color: theme.text_color(0.5), + width: 0.1, + radius: Radius::new(0), + }, ..Default::default() }) + .max_height(55) + .padding(5) .width(Fill) .height(Fill) } From 3457dbc23daf365a9259c8d367a793d8669218b9 Mon Sep 17 00:00:00 2001 From: unsecretised Date: Thu, 8 Jan 2026 15:44:39 +0800 Subject: [PATCH 2/2] cargo clippy fixes --- src/haptics.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/haptics.rs b/src/haptics.rs index c9d5d863..5aebd0c 100644 --- a/src/haptics.rs +++ b/src/haptics.rs @@ -2,7 +2,7 @@ use objc2_core_foundation::{CFNumber, CFNumberType, CFRetained, CFString, CFType}; use once_cell::sync::OnceCell; -use std::ffi::{CStr, c_char, c_void}; +use std::ffi::{c_char, c_void}; #[allow(dead_code)] #[derive(Copy, Clone, Debug)] @@ -73,7 +73,7 @@ impl MtsState { fn open_default_or_all() -> Option { let mut iter: io_iterator_t = 0; unsafe { - let name = CStr::from_bytes_with_nul_unchecked(b"AppleMultitouchDevice\0"); + let name = c"AppleMultitouchDevice"; let matching = IOServiceMatching(name.as_ptr()); if matching.is_null() { return None; @@ -140,7 +140,7 @@ impl MtsState { static MTS: OnceCell> = OnceCell::new(); fn mts_state() -> Option<&'static MtsState> { - MTS.get_or_init(|| MtsState::open_default_or_all()).as_ref() + MTS.get_or_init(MtsState::open_default_or_all).as_ref() } pub fn perform_haptic(pattern: HapticPattern) -> bool {