From a8372327daac7f672106645e3b93014e3c71c67a Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 28 Nov 2017 10:27:11 +0100 Subject: stylesheet example: Make dialog adapt to different sizes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The old code had fixed pixel sizes, which broke with high dpi and different font sizes. Also, simplify the hierarchy by replacing the top widget and the nested layouts with a Frame and grid layout. Task-number: QTBUG-64816 Change-Id: Ifeb458fb5d5e709e8add9c77c274dee13307d4c6 Reviewed-by: Jüri Valdmann Reviewed-by: Michal Klocek --- .../stylesheetbrowser/stylesheetdialog.ui | 199 +++++++-------------- 1 file changed, 63 insertions(+), 136 deletions(-) (limited to 'examples') diff --git a/examples/webenginewidgets/stylesheetbrowser/stylesheetdialog.ui b/examples/webenginewidgets/stylesheetbrowser/stylesheetdialog.ui index 3e70ce89a..19db267e8 100644 --- a/examples/webenginewidgets/stylesheetbrowser/stylesheetdialog.ui +++ b/examples/webenginewidgets/stylesheetbrowser/stylesheetdialog.ui @@ -5,154 +5,81 @@ Qt::ApplicationModal - - - 0 - 0 - 547 - 431 - - - - - 0 - 0 - - - - - 547 - 431 - - - - - 547 - 431 - - Stylesheets true - - - - - - 0 - 0 - - - - - - 9 - 9 - 511 - 371 - - - - - QLayout::SetDefaultConstraint - - - - - - - - - - - - - 0 - 0 - - - - Stylesheet name: - - - - - - - - 0 - 0 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Source code: - - - - - - - - Courier New - 10 - - - - - - - - - - Add - - - - - - - Remove - - - - - - - - - - - - + + Qt::Horizontal - QDialogButtonBox::Ok + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + QFrame::StyledPanel + + + QFrame::Plain + + + + + Stylesheet name: + + + + + + + + + + Source code: + + + + + + + + Courier New + 10 + + + + + + + + + + Add + + + + + + + Remove + + + + + + -- cgit v1.2.3