Skip to content

Commit

Permalink
push for releasae
Browse files Browse the repository at this point in the history
  • Loading branch information
khumnath committed Jun 22, 2024
1 parent 4b04d16 commit 88ad79d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ MainWindow::MainWindow(QWidget *parent) :

// Set today's date as default when setting up the UI
setupDefaultDate();
ui->dateButton->setStyleSheet("QPushButton { border: none; outline: none; }");
}

void MainWindow::setWindowPosition() {
Expand Down Expand Up @@ -132,7 +131,6 @@ int MainWindow::cnvToNepali(int mm, int dd, int yy) {
QToolTip::setFont(tooltipFont); // Set the tooltip font globally
ui->dateButton->setToolTip(nepaliFormat);
adjustTextColorBasedOnBackground();
ui->dateButton->setStyleSheet("QPushButton { border: none; outline: none; }");
if (calendarWindow) {
QPushButton *mitiButton = calendarWindow->findChild<QPushButton*>("mitiButton");
if (mitiButton) {
Expand Down Expand Up @@ -173,7 +171,7 @@ void MainWindow::adjustTextColorBasedOnBackground() {
QColor textColor = (brightness > 80) ? Qt::black : Qt::white;

// Set the text color of the dateButton
QString styleSheet = QString("QPushButton { color: %1; }").arg(textColor.name());
QString styleSheet = QString("QPushButton { color: %1; border: none; outline: none; }").arg(textColor.name());
ui->dateButton->setStyleSheet(styleSheet);
}

Expand Down
6 changes: 4 additions & 2 deletions mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -250,15 +250,17 @@ border-radius: 10px;</string>
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true">border: none;
border-radius: 5px,</string>
<string notr="true"/>
</property>
<property name="text">
<string>PushButton</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</widget>
</widget>
Expand Down

0 comments on commit 88ad79d

Please sign in to comment.