Add program::Preset and emulator::Mode

This commit is contained in:
Héctor Ramón Jiménez 2025-06-04 19:17:11 +02:00
parent 927d5b7cba
commit 73f5569f28
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
17 changed files with 305 additions and 39 deletions

View file

@ -64,8 +64,8 @@ use crate::core::text;
use crate::core::time::Instant;
use crate::core::widget::{self, Widget};
use crate::core::{
Clipboard, Element, Event, Length, Padding, Rectangle, Shell, Size, Theme,
Vector,
Clipboard, Element, Event, Length, Padding, Pixels, Rectangle, Shell, Size,
Theme, Vector,
};
use crate::overlay::menu;
use crate::text::LineHeight;
@ -249,9 +249,12 @@ where
}
/// Sets the text sixe of the [`ComboBox`].
pub fn size(mut self, size: f32) -> Self {
pub fn size(mut self, size: impl Into<Pixels>) -> Self {
let size = size.into();
self.text_input = self.text_input.size(size);
self.size = Some(size);
self.size = Some(size.0);
self
}