Interface mockup 7

This commit is contained in:
Dion Moult
2026-05-06 13:13:37 +10:00
parent 0d5fa0c20c
commit 5b2721c1c4
8 changed files with 86 additions and 84 deletions
+15 -15
View File
@@ -50,14 +50,14 @@ Section::Section(const QString& title, SectionHeaderMode header_mode,
setObjectName("panelSection");
auto* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(style::metrics::section_spacing);
layout->setSpacing(style::metrics::padding);
if (header_mode == SectionHeaderMode::Visible) {
auto* header = new QFrame(this);
header->setObjectName("panelSectionHeader");
auto* header_layout = new QHBoxLayout(header);
header_layout->setContentsMargins(0, 0, 0, 0);
header_layout->setSpacing(style::metrics::section_spacing);
header_layout->setSpacing(style::metrics::padding);
auto* toggle = new QToolButton(header);
toggle->setObjectName("panelSectionHeaderButton");
@@ -90,8 +90,10 @@ Section::Section(const QString& title, SectionHeaderMode header_mode,
auto* filter_wrapper = new QWidget(this);
filter_wrapper->setObjectName("panelSectionFilterWrapper");
auto* filter_wrapper_layout = new QVBoxLayout(filter_wrapper);
filter_wrapper_layout->setContentsMargins(style::metrics::filter_body_padding_x, 0,
style::metrics::filter_body_padding_x, 0);
filter_wrapper_layout->setContentsMargins(style::metrics::section_body_padding,
0,
style::metrics::section_body_padding,
0);
filter_wrapper_layout->setSpacing(0);
filter_wrapper_layout->addWidget(filter_field_);
layout->addWidget(filter_wrapper);
@@ -110,8 +112,10 @@ Section::Section(const QString& title, SectionHeaderMode header_mode,
auto* filter_wrapper = new QWidget(this);
filter_wrapper->setObjectName("panelSectionFilterWrapper");
auto* filter_wrapper_layout = new QVBoxLayout(filter_wrapper);
filter_wrapper_layout->setContentsMargins(style::metrics::hidden_filter_body_padding_x, 0,
style::metrics::hidden_filter_body_padding_x, 0);
filter_wrapper_layout->setContentsMargins(style::metrics::section_body_padding,
0,
style::metrics::section_body_padding,
0);
filter_wrapper_layout->setSpacing(0);
filter_wrapper_layout->addWidget(filter_field_);
layout->addWidget(filter_wrapper);
@@ -120,15 +124,11 @@ Section::Section(const QString& title, SectionHeaderMode header_mode,
body_ = new QWidget(this);
body_->setObjectName("panelSectionBody");
body_layout_ = new QVBoxLayout(body_);
if (header_mode == SectionHeaderMode::Visible) {
body_layout_->setContentsMargins(style::metrics::section_body_padding_x,
style::metrics::section_body_padding_top,
style::metrics::section_body_padding_x, 0);
} else {
body_layout_->setContentsMargins(style::metrics::hidden_section_body_padding_x, 0,
style::metrics::hidden_section_body_padding_x, 0);
}
body_layout_->setSpacing(style::metrics::section_spacing);
body_layout_->setContentsMargins(style::metrics::section_body_padding,
0,
style::metrics::section_body_padding,
0);
body_layout_->setSpacing(style::metrics::padding);
layout->addWidget(body_);
}