11#include " passbook.h"
2- #include " aesencrypt .h"
2+ #include " qaesencryption .h"
33#include < DWidget>
44#include < DTitlebar>
55#include < DMainWindow>
@@ -56,7 +56,14 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
5656 this ->isUpdating =false ;
5757 }
5858 });
59-
59+ // 创建下方装饰条
60+ QWidget *bottomWidget=new QWidget (this );
61+ bottomWidget->setFixedSize (861 ,50 );
62+ bottomWidget->move (0 ,440 );
63+ pal = bottomWidget->palette ();// 设置widget背景色
64+ pal.setColor (QPalette::Background, QColor (49 ,53 ,62 , 255 ));
65+ bottomWidget->setPalette (pal);
66+ bottomWidget->setAutoFillBackground (true );
6067
6168 // 创建搜索框widget并且将控件放入该widget
6269 QWidget *searchWidget = new QWidget (this );
@@ -71,12 +78,13 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
7178 searchLayout->addWidget (searchEdit);
7279 searchWidget->setFixedSize (816 , 53 );
7380 searchWidget->setStyleSheet (" background-color: #C3C9D3;border-radius: 12px;" );// 设置圆角
81+ searchEdit->setPlaceholderText (" 搜索" );
7482 searchWidget->move (22 , 69 );
7583
7684 // 密码详情
7785 QWidget *passWidget=new QWidget (this );
7886 passWidget->move (22 ,142 );
79- passWidget->resize (830 ,330 );
87+ passWidget->resize (830 ,350 );
8088
8189
8290
@@ -86,22 +94,22 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
8694 addPassButton->setIcon (addPixmap);
8795 addPassButton->setIconSize (QSize (31 ,31 ));
8896 addPassButton->setStyleSheet (" border:none; background-color:transparent;" );
89- addPassButton->move (0 ,301 );
97+ addPassButton->move (0 ,307 );
9098 // 创建导入导出按钮
9199 QPushButton *importButton =new QPushButton (passWidget);
92100 QPixmap importPixmap (" :/res/passbook/import.png" );
93101 importButton->setIcon (importPixmap);
94102 importButton->setIconSize (QSize (31 ,31 ));
95103 importButton->setStyleSheet (" border:none; background-color:transparent;" );
96- importButton->move (739 ,301 );
104+ importButton->move (739 ,307 );
97105 importButton->setToolTip (" 导入数据" );
98106
99107 QPushButton *exportButton =new QPushButton (passWidget);
100108 QPixmap exportPixmap (" :/res/passbook/export.png" );
101109 exportButton->setIcon (exportPixmap);
102110 exportButton->setIconSize (QSize (31 ,31 ));
103111 exportButton->setStyleSheet (" border:none; background-color:transparent;" );
104- exportButton->move (787 ,301 );
112+ exportButton->move (787 ,307 );
105113 exportButton->setToolTip (" 复制数据到桌面" );
106114
107115
@@ -268,6 +276,8 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
268276 copyButton->move (738 , 5 );
269277 copyButton->setIcon (QIcon (" :/res/passbook/copy.png" ));
270278 copyButton->setIconSize (QSize (30 , 30 ));
279+ copyButton->setToolTip (" 复制密码" );
280+ copyButton->setMouseTracking (true );
271281 copyButton->setStyleSheet (" border:none; background-color:transparent;" );
272282 // 创建删除按钮
273283 QPushButton *delButton=new QPushButton (credentialWidget);
@@ -372,6 +382,8 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
372382 copyButton->move (738 , 5 );
373383 copyButton->setIcon (QIcon (" :/res/passbook/copy.png" ));
374384 copyButton->setIconSize (QSize (30 , 30 ));
385+ copyButton->setToolTip (" 复制密码" );
386+ copyButton->setMouseTracking (true );
375387 copyButton->setStyleSheet (" border:none; background-color:transparent;" );
376388 // 创建删除按钮
377389 QPushButton *delButton=new QPushButton (credentialWidget);
@@ -532,6 +544,8 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
532544 copyButton->move (738 , 5 );
533545 copyButton->setIcon (QIcon (" :/res/passbook/copy.png" ));
534546 copyButton->setIconSize (QSize (30 , 30 ));
547+ copyButton->setToolTip (" 复制密码" );
548+ copyButton->setMouseTracking (true );
535549 copyButton->setStyleSheet (" border:none; background-color:transparent;" );
536550 // 创建删除按钮
537551 QPushButton *delButton=new QPushButton (credentialWidget);
@@ -637,6 +651,8 @@ PassBook::PassBook(QString accountPassword, DWidget *parent): m_accountPassword(
637651 copyButton->move (738 , 5 );
638652 copyButton->setIcon (QIcon (" :/res/passbook/copy.png" ));
639653 copyButton->setIconSize (QSize (30 , 30 ));
654+ copyButton->setToolTip (" 复制密码" );
655+ copyButton->setMouseTracking (true );
640656 copyButton->setStyleSheet (" border:none; background-color:transparent;" );
641657 // 创建删除按钮
642658 QPushButton *delButton=new QPushButton (credentialWidget);
0 commit comments