network stylesheet improvement
This commit is contained in:
@@ -16,12 +16,10 @@ networkCfgDialog::networkCfgDialog(QWidget* parent) :
|
|||||||
ui(new Ui::networkCfgDialog)
|
ui(new Ui::networkCfgDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
this->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
|
||||||
msgDialog = new GUIMessageDialog(this);
|
msgDialog = new GUIMessageDialog(this);
|
||||||
msgDialog->hide();
|
msgDialog->hide();
|
||||||
|
|
||||||
|
|
||||||
setShadow(this);
|
|
||||||
|
|
||||||
ui->sw_dhcp->setChecked(true);
|
ui->sw_dhcp->setChecked(true);
|
||||||
ui->sw_dhcp->setButtonStyle(ImageSwitch::ButtonStyle_1);
|
ui->sw_dhcp->setButtonStyle(ImageSwitch::ButtonStyle_1);
|
||||||
|
|
||||||
@@ -166,20 +164,7 @@ networkCfgDialog::networkCfgDialog(QWidget* parent) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӱ
|
|
||||||
void networkCfgDialog::setShadow(QDialog* dialog)
|
|
||||||
{
|
|
||||||
dialog->setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint);
|
|
||||||
dialog->setAttribute(Qt::WA_TranslucentBackground, true);
|
|
||||||
//setWindowFlags(Qt::Window | Qt::CustomizeWindowHint | Qt::FramelessWindowHint);
|
|
||||||
QGraphicsDropShadowEffect* shadow = new QGraphicsDropShadowEffect(dialog);
|
|
||||||
shadow->setOffset(0, 0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD><EFBFBD>
|
|
||||||
shadow->setColor(Qt::black); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0>ɫ
|
|
||||||
shadow->setBlurRadius(20); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӰԲ<D3B0><D4B2>
|
|
||||||
dialog->setGraphicsEffect(shadow); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӱ
|
|
||||||
//ui->frame->setObjectName("widgetShadow");
|
|
||||||
//ui->frame->setStyleSheet("#widgetShadow{border-radius:5px;}");//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8>
|
|
||||||
}
|
|
||||||
|
|
||||||
networkCfgDialog::~networkCfgDialog()
|
networkCfgDialog::~networkCfgDialog()
|
||||||
{
|
{
|
||||||
@@ -236,6 +221,7 @@ void networkCfgDialog::applyData()
|
|||||||
if (!isModified())
|
if (!isModified())
|
||||||
{
|
{
|
||||||
accept();
|
accept();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
ui->tabWidget->setCurrentIndex(2);
|
ui->tabWidget->setCurrentIndex(2);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,26 @@
|
|||||||
<string>Network Settings</string>
|
<string>Network Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true">QTabWidget::pane {
|
||||||
|
border-top: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab {
|
||||||
|
font-size:30px;
|
||||||
|
height:50px;
|
||||||
|
width:150px;
|
||||||
|
background:#4d4d4d;
|
||||||
|
border: 0px;
|
||||||
|
border-top-left-radius: 20%;
|
||||||
|
border-top-right-radius: 20%;
|
||||||
|
border-bottom-left-radius:0%;
|
||||||
|
border-bottom-right-radius:0%;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab:selected, QTabBar::tab:hover {
|
||||||
|
border-bottom:5px solid #4a88c7;
|
||||||
|
background: #505050;}</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
@@ -34,8 +53,11 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -415,7 +437,11 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPlainTextEdit" name="output"/>
|
<widget class="QPlainTextEdit" name="output">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
Reference in New Issue
Block a user