adjust some too pruning QLayout::setContentsMargins

This commit is contained in:
Garux 2024-01-30 02:56:56 +06:00
parent 6995ef0eb4
commit 454660c3e8
3 changed files with 4 additions and 2 deletions

View File

@ -1237,6 +1237,7 @@ QWidget* EntityInspector_constructWindow( QWidget* toplevel ){
{ {
// key/value entry // key/value entry
auto grid = new QGridLayout; auto grid = new QGridLayout;
grid->setContentsMargins( 4, 0, 4, 0 );
vbox->addLayout( grid ); vbox->addLayout( grid );
{ {
grid->addWidget( new QLabel( "Key" ), 0, 0 ); grid->addWidget( new QLabel( "Key" ), 0, 0 );
@ -1284,6 +1285,7 @@ QWidget* EntityInspector_constructWindow( QWidget* toplevel ){
} }
{ {
auto hbox = new QHBoxLayout; auto hbox = new QHBoxLayout;
hbox->setContentsMargins( 4, 0, 4, 0 );
vbox->addLayout( hbox ); vbox->addLayout( hbox );
{ {
auto b = new QPushButton( "Clear All" ); auto b = new QPushButton( "Clear All" );

View File

@ -283,7 +283,7 @@ void EntityList_constructWindow( QWidget* main_window ){
g_guiSettings.addWindow( window, "EntityList/geometry", 350, 500 ); g_guiSettings.addWindow( window, "EntityList/geometry", 350, 500 );
{ {
auto *vbox = new QVBoxLayout( window ); 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; auto *tree = getEntityList().m_tree_view = new QTreeView;
tree->setHeaderHidden( true ); tree->setHeaderHidden( true );

View File

@ -2230,7 +2230,7 @@ class TextEditor : public QObject
auto *hbox = new QHBoxLayout; auto *hbox = new QHBoxLayout;
vbox->addLayout( hbox ); vbox->addLayout( hbox );
hbox->setContentsMargins( 0, 0, 0, 0 ); hbox->setContentsMargins( 4, 0, 4, 4 );
m_button = new QPushButton( "Save" ); m_button = new QPushButton( "Save" );
m_button->setSizePolicy( QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed ); m_button->setSizePolicy( QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed );