fix: gnome margin visual bug

This commit is contained in:
2025-08-20 01:53:24 +01:00
parent c84715b21c
commit 511698eefe
4 changed files with 5 additions and 1 deletions

View File

@@ -320,6 +320,8 @@ enzo::ui::TabMenuButton::TabMenuButton(const QString &text, QWidget *parent)
icon_->setFixedSize(16, 16); icon_->setFixedSize(16, 16);
mainLayout_ = new QHBoxLayout(); mainLayout_ = new QHBoxLayout();
constexpr int leftRightMargin = 10;
mainLayout_->setContentsMargins(leftRightMargin,0,leftRightMargin,0);
mainLayout_->addWidget(icon_); mainLayout_->addWidget(icon_);
mainLayout_->addWidget(textLabel_); mainLayout_->addWidget(textLabel_);

View File

@@ -21,6 +21,7 @@ enzo::ui::FloatSliderParm::FloatSliderParm(std::weak_ptr<prm::Parameter> paramet
parameter_ = parameter; parameter_ = parameter;
mainLayout_ = new QVBoxLayout(); mainLayout_ = new QVBoxLayout();
mainLayout_->setContentsMargins(0,0,0,0);
setLayout(mainLayout_); setLayout(mainLayout_);
valueLabel_ = new QLabel(); valueLabel_ = new QLabel();

View File

@@ -25,6 +25,7 @@ enzo::ui::IntSliderParm::IntSliderParm(std::weak_ptr<prm::Parameter> parameter,
parameter_=parameter; parameter_=parameter;
mainLayout_ = new QVBoxLayout(); mainLayout_ = new QVBoxLayout();
mainLayout_->setContentsMargins(0,0,0,0);
setLayout(mainLayout_); setLayout(mainLayout_);
valueLabel_ = new QLabel(); valueLabel_ = new QLabel();

View File

@@ -15,9 +15,9 @@ int main(int argc, char **argv)
format.setSamples(4); format.setSamples(4);
QSurfaceFormat::setDefaultFormat(format); QSurfaceFormat::setDefaultFormat(format);
// init plugins
enzo::op::OperatorTable::initPlugins(); enzo::op::OperatorTable::initPlugins();
QApplication app (argc, argv); QApplication app (argc, argv);
EnzoUI interface; EnzoUI interface;