Skip to content

Commit

Permalink
Place color around central widget instead of horizontal bar
Browse files Browse the repository at this point in the history
  • Loading branch information
droidmonkey committed Oct 7, 2024
1 parent d68a1fc commit e46b810
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
10 changes: 5 additions & 5 deletions src/gui/DatabaseOpenWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ void DatabaseOpenWidget::load(const QString& filename)
m_ui->labelHeadline->setText(label);

auto color = m_db->publicColor();
m_ui->displayColorLabel->setVisible(!color.isEmpty());
m_ui->displayColorLabel->setStyleSheet(
QString("background: %1; border: 1px solid palette(dark); border-radius: 4px").arg(color));

// m_ui->centralStack->setStyleSheet(QString("QStackedWidget {border: 4px solid %1}").arg(color));
if (!color.isEmpty()) {
m_ui->centralStack->setStyleSheet(QString("QStackedWidget {border: 4px solid %1}").arg(color));
} else {
m_ui->centralStack->setStyleSheet("");
}

if (config()->get(Config::RememberLastKeyFiles).toBool()) {
auto lastKeyFiles = config()->get(Config::LastKeyFiles).toHash();
Expand Down
18 changes: 1 addition & 17 deletions src/gui/DatabaseOpenWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</item>
<item>
<widget class="QWidget" name="formContainer" native="true">
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="1,0,0,0,0,0,2">
<layout class="QVBoxLayout" name="verticalLayout_4" stretch="1,0,0,0,0,2">
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
Expand Down Expand Up @@ -88,22 +88,6 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="displayColorLabel">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>8</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background:cyan; border: 1px solid black; border-radius: 4px</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="ElidedLabel" name="fileNameLabel">
<property name="text">
Expand Down

0 comments on commit e46b810

Please sign in to comment.