80 lines
3.4 KiB
Diff
80 lines
3.4 KiB
Diff
From 0c5743e4f557e495153a86303334495938017a8e Mon Sep 17 00:00:00 2001
|
|
From: huayadong <yadong.hua@cs2c.com.cn>
|
|
Date: Fri, 4 Dec 2020 11:31:31 +0800
|
|
Subject: [PATCH] Fix bug 27479 [alarm clock], modify the alarm time to 12
|
|
hours, add an alarm clock - time of 12:00, and the left text morning jitters
|
|
|
|
---
|
|
src/plugins/ukui-clock/clock.cpp | 7 -------
|
|
src/plugins/ukui-clock/clock.ui | 2 +-
|
|
2 files changed, 1 insertion(+), 8 deletions(-)
|
|
|
|
diff --git a/src/plugins/ukui-clock/clock.cpp b/src/plugins/ukui-clock/clock.cpp
|
|
index 390f98e..cf5bc79 100644
|
|
--- a/src/plugins/ukui-clock/clock.cpp
|
|
+++ b/src/plugins/ukui-clock/clock.cpp
|
|
@@ -848,7 +848,6 @@ void Clock::text_timerUpdate()
|
|
if(model_setup->index(0, 2).data().toInt() == 1){
|
|
ui->label_6->setText(change_NUM_to_str(time_H)+":"+change_NUM_to_str(time_M)+":"+change_NUM_to_str(time_S));
|
|
ui->label_15->setText("");
|
|
- ui->label_17->setText("");
|
|
if(system_time_flag == 0){
|
|
system_time_flag = 1;
|
|
for (int i = 0; i < rowNum; i++) {
|
|
@@ -863,11 +862,9 @@ void Clock::text_timerUpdate()
|
|
if (time_H >=12) {
|
|
ui->label_6->setText(change_NUM_to_str(time_H - 12)+":"+change_NUM_to_str(time_M)+":"+change_NUM_to_str(time_S));
|
|
ui->label_15->setText(tr("PM"));
|
|
- ui->label_17->setText(tr("PM"));
|
|
} else {
|
|
ui->label_6->setText(change_NUM_to_str(time_H)+":"+change_NUM_to_str(time_M)+":"+change_NUM_to_str(time_S));
|
|
ui->label_15->setText(tr("AM"));
|
|
- ui->label_17->setText(tr("AM"));
|
|
}
|
|
|
|
if(time_H == 0)
|
|
@@ -891,7 +888,6 @@ void Clock::text_timerUpdate()
|
|
if (str_output.compare("'24'\n") == 0) {
|
|
ui->label_6->setText(change_NUM_to_str(time_H)+":"+change_NUM_to_str(time_M)+":"+change_NUM_to_str(time_S));
|
|
ui->label_15->setText("");
|
|
- ui->label_17->setText("");
|
|
if (system_time_flag == 0) {
|
|
system_time_flag = 1;
|
|
for(int i = 0; i < rowNum; i++) {
|
|
@@ -906,11 +902,9 @@ void Clock::text_timerUpdate()
|
|
if (time_H >= 12) {
|
|
ui->label_6->setText(change_NUM_to_str(time_H - 12)+":"+change_NUM_to_str(time_M)+":"+change_NUM_to_str(time_S));
|
|
ui->label_15->setText(tr("PM"));
|
|
- ui->label_17->setText(tr("PM"));
|
|
} else {
|
|
ui->label_6->setText(change_NUM_to_str(time_H)+":"+change_NUM_to_str(time_M)+":"+change_NUM_to_str(time_S));
|
|
ui->label_15->setText(tr("AM"));
|
|
- ui->label_17->setText(tr("AM"));
|
|
}
|
|
|
|
if(time_H == 0)
|
|
@@ -919,7 +913,6 @@ void Clock::text_timerUpdate()
|
|
if(time_H == 12)
|
|
ui->label_6->setText(change_NUM_to_str(time_H)+":"+change_NUM_to_str(time_M)+":"+change_NUM_to_str(time_S));
|
|
|
|
-
|
|
if (system_time_flag == 1) {
|
|
system_time_flag = 0;
|
|
for (int i = 0; i < rowNum; i++) {
|
|
diff --git a/src/plugins/ukui-clock/clock.ui b/src/plugins/ukui-clock/clock.ui
|
|
index d339720..8edef78 100644
|
|
--- a/src/plugins/ukui-clock/clock.ui
|
|
+++ b/src/plugins/ukui-clock/clock.ui
|
|
@@ -751,7 +751,7 @@ border-radius:4px;
|
|
<property name="geometry">
|
|
<rect>
|
|
<x>50</x>
|
|
- <y>80</y>
|
|
+ <y>123</y>
|
|
<width>31</width>
|
|
<height>22</height>
|
|
</rect>
|
|
--
|
|
2.33.0
|
|
|