From 454660c3e8d332ebdc16f972aab02a38f5ee9795 Mon Sep 17 00:00:00 2001 From: Garux Date: Tue, 30 Jan 2024 02:56:56 +0600 Subject: [PATCH] adjust some too pruning QLayout::setContentsMargins --- radiant/entityinspector.cpp | 2 ++ radiant/entitylist.cpp | 2 +- radiant/gtkdlgs.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/radiant/entityinspector.cpp b/radiant/entityinspector.cpp index acc9813b..92c4c045 100644 --- a/radiant/entityinspector.cpp +++ b/radiant/entityinspector.cpp @@ -1237,6 +1237,7 @@ QWidget* EntityInspector_constructWindow( QWidget* toplevel ){ { // key/value entry auto grid = new QGridLayout; + grid->setContentsMargins( 4, 0, 4, 0 ); vbox->addLayout( grid ); { grid->addWidget( new QLabel( "Key" ), 0, 0 ); @@ -1284,6 +1285,7 @@ QWidget* EntityInspector_constructWindow( QWidget* toplevel ){ } { auto hbox = new QHBoxLayout; + hbox->setContentsMargins( 4, 0, 4, 0 ); vbox->addLayout( hbox ); { auto b = new QPushButton( "Clear All" ); diff --git a/radiant/entitylist.cpp b/radiant/entitylist.cpp index b4d1ef3d..3d25ed3c 100644 --- a/radiant/entitylist.cpp +++ b/radiant/entitylist.cpp @@ -283,7 +283,7 @@ void EntityList_constructWindow( QWidget* main_window ){ g_guiSettings.addWindow( window, "EntityList/geometry", 350, 500 ); { auto *vbox = new QVBoxLayout( window ); - vbox->setContentsMargins( 0, 0, 0, 0 ); + vbox->setContentsMargins( 4, 0, 4, 4 ); { auto *tree = getEntityList().m_tree_view = new QTreeView; tree->setHeaderHidden( true ); diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index 35619591..db5c81d0 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -2230,7 +2230,7 @@ class TextEditor : public QObject auto *hbox = new QHBoxLayout; vbox->addLayout( hbox ); - hbox->setContentsMargins( 0, 0, 0, 0 ); + hbox->setContentsMargins( 4, 0, 4, 4 ); m_button = new QPushButton( "Save" ); m_button->setSizePolicy( QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed );