Skip to content

Commit

Permalink
Minor style fixes (#11445)
Browse files Browse the repository at this point in the history
* Clean up removed elements in qt stylesheets
* Disable main window when saving
* Fixed triangle size in group view

---------

Co-authored-by: Jonathan White <[email protected]>
  • Loading branch information
xboxones1 and droidmonkey committed Jan 3, 2025
1 parent bb69504 commit 8b24e48
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
13 changes: 7 additions & 6 deletions src/gui/DatabaseWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2227,9 +2227,10 @@ bool DatabaseWidget::performSave(QString& errorMessage, const QString& fileName)
QPointer<QWidget> focusWidget(qApp->focusWidget());

// Lock out interactions
m_entryView->setDisabled(true);
m_groupView->setDisabled(true);
m_tagView->setDisabled(true);
auto mainWindow = getMainWindow();
if (mainWindow) {
mainWindow->setDisabled(true);
}
QApplication::processEvents();

Database::SaveAction saveAction = Database::Atomic;
Expand Down Expand Up @@ -2269,9 +2270,9 @@ bool DatabaseWidget::performSave(QString& errorMessage, const QString& fileName)
}

// Return control
m_entryView->setDisabled(false);
m_groupView->setDisabled(false);
m_tagView->setDisabled(false);
if (mainWindow) {
mainWindow->setDisabled(false);
}

if (focusWidget && focusWidget->isVisible()) {
focusWidget->setFocus();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/styles/base/BaseStyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ namespace Phantom
// Expected time (release): 5usecs for regular-sized arrows
Q_NEVER_INLINE void drawArrow(QPainter* p, QRect rect, Qt::ArrowType arrowDirection, const QBrush& brush)
{
const qreal ArrowBaseRatio = 0.9;
const qreal ArrowBaseRatio = 1.0;
qreal irx, iry, irw, irh;
QRectF(rect).getRect(&irx, &iry, &irw, &irh);
if (irw < 1.0 || irh < 1.0)
Expand Down
4 changes: 2 additions & 2 deletions src/gui/styles/dark/darkstyle.qss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
DatabaseWidget:!active, GroupView:!active,
DatabaseWidget:!active,
DatabaseWidget #groupView:!active, DatabaseWidget #tagView:!active,
EntryPreviewWidget QLineEdit:!active, EntryPreviewWidget QTextEdit:!active,
EntryPreviewWidget TagsEdit:!active, QStatusBar:!active {
background-color: #404042;
}

DatabaseWidget:disabled, GroupView:disabled,
DatabaseWidget:disabled,
DatabaseWidget #groupView:disabled, DatabaseWidget #tagView:disabled,
EntryPreviewWidget QLineEdit:disabled, EntryPreviewWidget QTextEdit:disabled,
EntryPreviewWidget TagsEdit:disabled, QStatusBar:disabled {
Expand Down
4 changes: 2 additions & 2 deletions src/gui/styles/light/lightstyle.qss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
DatabaseWidget:!active, GroupView:!active,
DatabaseWidget:!active,
DatabaseWidget #groupView:!active, DatabaseWidget #tagView:!active,
EntryPreviewWidget QLineEdit:!active, EntryPreviewWidget QTextEdit:!active,
EntryPreviewWidget TagsEdit:!active, QStatusBar:!active {
background-color: #FCFCFC;
}

DatabaseWidget:disabled, GroupView:disabled,
DatabaseWidget:disabled,
DatabaseWidget #groupView:disabled, DatabaseWidget #tagView:disabled,
EntryPreviewWidget QLineEdit:disabled, EntryPreviewWidget QTextEdit:disabled,
EntryPreviewWidget TagsEdit:disabled, QStatusBar:disabled {
Expand Down

0 comments on commit 8b24e48

Please sign in to comment.