From 39ef6ed492e27f176f7ad989fb3cd19fbcbde167 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 21 Nov 2023 06:34:32 -0600 Subject: [PATCH] smaller font picker so it fits better on SongEditor.qml --- src/qml/presenter/SongEditor.qml | 14 +++++++------- src/rust/image_model.rs | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/qml/presenter/SongEditor.qml b/src/qml/presenter/SongEditor.qml index 7a619eb..4b3d074 100644 --- a/src/qml/presenter/SongEditor.qml +++ b/src/qml/presenter/SongEditor.qml @@ -29,7 +29,7 @@ Item { Controls.ComboBox { id: fontBox model: Qt.fontFamilies() - implicitWidth: 300 + implicitWidth: root.width / 5 > 300 ? 300 : root.width / 5 editable: true hoverEnabled: true /* flat: true */ @@ -164,12 +164,6 @@ Item { Controls.ToolSeparator {} Item { Layout.fillWidth: true } Controls.ToolSeparator {} - Controls.ToolButton { - text: "Effects" - icon.name: "image-auto-adjust" - hoverEnabled: true - onClicked: {} - } Controls.ToolButton { id: backgroundButton text: "Background" @@ -177,6 +171,12 @@ Item { hoverEnabled: true onClicked: backgroundTypePopup.open() } + Controls.ToolButton { + text: "Effects" + icon.name: "image-auto-adjust" + hoverEnabled: true + onClicked: {} + } Controls.Popup { id: backgroundTypePopup diff --git a/src/rust/image_model.rs b/src/rust/image_model.rs index 89f3c89..fb217b8 100644 --- a/src/rust/image_model.rs +++ b/src/rust/image_model.rs @@ -62,17 +62,17 @@ mod image_model { TitleRole, } - impl FromStr for Role { - type Err = (); - fn from_str(input: &str) -> Result { - match input { - "id" => Ok(Role::IdRole), - "title" => Ok(Role::TitleRole), - "path" => Ok(Role::PathRole), - _ => Err(()), - } - } - } + // impl FromStr for Role { + // type Err = (); + // fn from_str(input: &str) -> Result { + // match input { + // "id" => Ok(Role::IdRole), + // "title" => Ok(Role::TitleRole), + // "path" => Ok(Role::PathRole), + // _ => Err(()), + // } + // } + // } // use crate::entities::{images, prelude::Images}; // use sea_orm::{ConnectionTrait, Database, DbBackend, DbErr, Statement, ActiveValue};