Rename resize-border => resize-border-width

This commit is contained in:
Olivier Goffart 2024-07-05 11:57:45 +02:00
parent 6b1c02be94
commit 7c93c7438b
5 changed files with 5 additions and 5 deletions

View file

@ -22,7 +22,7 @@ All notable changes to this project are documented in this file.
### Slint Language ### Slint Language
- Added `resize-border` to Window - Added `resize-border-width` to Window
- Support several exported component that inherits Window pr Dialog from the main .slint file - Support several exported component that inherits Window pr Dialog from the main .slint file
- Mark exported component that doesn't inherit from Window or Dialog as deprecated - Mark exported component that doesn't inherit from Window or Dialog as deprecated
- Deprecated generating the last import if there is no component in a file - Deprecated generating the last import if there is no component in a file

View file

@ -882,5 +882,5 @@ or smaller. The initial width can be controlled with the `preferred-width` prope
- **`default-font-weight`** (_in_ _int_): The font weight to use as default in text elements inside this window, that don't have their `font-weight` property set. The values range from 100 (lightest) to 900 (thickest). 400 is the normal weight. - **`default-font-weight`** (_in_ _int_): The font weight to use as default in text elements inside this window, that don't have their `font-weight` property set. The values range from 100 (lightest) to 900 (thickest). 400 is the normal weight.
- **`icon`** (_in_ _image_): The window icon shown in the title bar or the task bar on window managers supporting it. - **`icon`** (_in_ _image_): The window icon shown in the title bar or the task bar on window managers supporting it.
- **`no-frame`** (_in_ _bool_): Whether the window should be borderless/frameless or not. - **`no-frame`** (_in_ _bool_): Whether the window should be borderless/frameless or not.
- **`resize-border`** (_in_ _length_): Size of the resize border in borderless/frameless windows (winit only for now). - **`resize-border-width`** (_in_ _length_): Size of the resize border in borderless/frameless windows (winit only for now).
- **`title`** (_in_ _string_): The window title that is shown in the title bar. - **`title`** (_in_ _string_): The window title that is shown in the title bar.

View file

@ -407,7 +407,7 @@ impl winit::application::ApplicationHandler<SlintUserEvent> for EventLoopState {
self.current_resize_direction, self.current_resize_direction,
runtime_window runtime_window
.window_item() .window_item()
.map_or(0_f64, |w| w.as_pin_ref().resize_border().0.into()), .map_or(0_f64, |w| w.as_pin_ref().resize_border_width().get().into()),
); );
let position = position.to_logical(runtime_window.scale_factor() as f64); let position = position.to_logical(runtime_window.scale_factor() as f64);
self.cursor_pos = euclid::point2(position.x, position.y); self.cursor_pos = euclid::point2(position.x, position.y);

View file

@ -152,7 +152,7 @@ component WindowItem {
in property <brush> color <=> background; in property <brush> color <=> background;
in property <string> title: "Slint Window"; in property <string> title: "Slint Window";
in property <bool> no-frame; in property <bool> no-frame;
in property <length> resize-border; in property <length> resize-border-width;
in property <bool> always-on-top; in property <bool> always-on-top;
in property <string> default-font-family; in property <string> default-font-family;
in-out property <length> default-font-size; // <=> StyleMetrics.default-font-size set in apply_default_properties_from_style in-out property <length> default-font-size; // <=> StyleMetrics.default-font-size set in apply_default_properties_from_style

View file

@ -1254,7 +1254,7 @@ pub struct WindowItem {
pub background: Property<Brush>, pub background: Property<Brush>,
pub title: Property<SharedString>, pub title: Property<SharedString>,
pub no_frame: Property<bool>, pub no_frame: Property<bool>,
pub resize_border: Property<LogicalLength>, pub resize_border_width: Property<LogicalLength>,
pub always_on_top: Property<bool>, pub always_on_top: Property<bool>,
pub icon: Property<crate::graphics::Image>, pub icon: Property<crate::graphics::Image>,
pub default_font_family: Property<SharedString>, pub default_font_family: Property<SharedString>,