From 0db2beeff9e70b34990c0e6fadc387512a12faed Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 14 Jul 2023 15:02:24 +0200 Subject: [PATCH] Cmake: Make line edit in formatter settings editable again ... and improve layout a bit Change-Id: Ib1f7626259ca59190804faab5e2f453e8520de58 Reviewed-by: Eike Ziller --- src/plugins/cmakeprojectmanager/cmakeformatter.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakeformatter.cpp b/src/plugins/cmakeprojectmanager/cmakeformatter.cpp index dca6d47e203..8a727ba7942 100644 --- a/src/plugins/cmakeprojectmanager/cmakeformatter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeformatter.cpp @@ -60,10 +60,12 @@ public: autoFormatOnlyCurrentProject.setSettingsKey("autoFormatOnlyCurrentProject"); autoFormatOnlyCurrentProject.setDefaultValue(true); autoFormatOnlyCurrentProject.setLabelText(Tr::tr("Restrict to files contained in the current project")); + autoFormatOnlyCurrentProject.setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox); autoFormatMime.setSettingsKey("autoFormatMime"); autoFormatMime.setDefaultValue("text/x-cmake"); autoFormatMime.setLabelText(Tr::tr("Restrict to MIME types:")); + autoFormatMime.setDisplayStyle(StringAspect::LineEditDisplay); setLayouter([this] { using namespace Layouting; @@ -73,9 +75,12 @@ public: Group { title(Tr::tr("Automatic Formatting on File Save")), autoFormatOnSave.groupChecker(), - Form { - autoFormatMime, br, - Span(2, autoFormatOnlyCurrentProject) + // Conceptually, that's a Form, but this would look odd: + // xxxxxx [____] + // [x] xxxxxxxxxxxxxx + Column { + Row { autoFormatMime }, + autoFormatOnlyCurrentProject } }, st