Commit d68793a5 by NitefullWind

界面外加入阴影背景。

parent c4310cba
...@@ -15,6 +15,7 @@ FMVipLogin::FMVipLogin(QDialog *parent) : ...@@ -15,6 +15,7 @@ FMVipLogin::FMVipLogin(QDialog *parent) :
connect(this, &FMVipLogin::startreader, &m_reader, &Reader::readVipNO); connect(this, &FMVipLogin::startreader, &m_reader, &Reader::readVipNO);
connect(&m_reader, &Reader::getVipNO, this, &FMVipLogin::readVipNO); connect(&m_reader, &Reader::getVipNO, this, &FMVipLogin::readVipNO);
emit startreader(); emit startreader();
ui->login_edit->setFocus();
qDebug() << "main:" <<QThread::currentThreadId(); qDebug() << "main:" <<QThread::currentThreadId();
} }
...@@ -113,7 +114,7 @@ void FMVipLogin::on_login_key_clicked() ...@@ -113,7 +114,7 @@ void FMVipLogin::on_login_key_clicked()
connect(numpad, &FMNumPad::digit_confirm, this, &FMVipLogin::on_confirm_clicked); connect(numpad, &FMNumPad::digit_confirm, this, &FMVipLogin::on_confirm_clicked);
} }
numpad->show(); numpad->show();
numpad->setGeometry(x() + width(), numpad->y(), numpad->width(), numpad->height()); numpad->setGeometry(x() + (width()+640)/2, numpad->y(), numpad->width(), numpad->height());
} }
void FMVipLogin::on_edit_change(QString numkey) void FMVipLogin::on_edit_change(QString numkey)
......
...@@ -180,7 +180,7 @@ void FMVipOrder::on_pay_key_clicked() ...@@ -180,7 +180,7 @@ void FMVipOrder::on_pay_key_clicked()
connect(numpad, &FMNumPad::digit_confirm, this, &FMVipOrder::on_confirm_clicked); connect(numpad, &FMNumPad::digit_confirm, this, &FMVipOrder::on_confirm_clicked);
} }
numpad->show(); numpad->show();
numpad->setGeometry(x() + width(), numpad->y(), numpad->width(), numpad->height()); numpad->setGeometry(x() + (width()+950)/2, numpad->y(), numpad->width(), numpad->height());
} }
void FMVipOrder::on_clean_numpad() void FMVipOrder::on_clean_numpad()
......
...@@ -14,6 +14,7 @@ FMVipWnd::FMVipWnd(QDialog *parent) : ...@@ -14,6 +14,7 @@ FMVipWnd::FMVipWnd(QDialog *parent) :
loadingWindow(new FMLoading(this)) loadingWindow(new FMLoading(this))
{ {
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint); setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_QuitOnClose, false); setAttribute(Qt::WA_QuitOnClose, false);
setAttribute(Qt::WA_DeleteOnClose, false); setAttribute(Qt::WA_DeleteOnClose, false);
setIsBusy(false); setIsBusy(false);
...@@ -49,12 +50,12 @@ void FMVipWnd::setIsBusy(const bool isBusy) ...@@ -49,12 +50,12 @@ void FMVipWnd::setIsBusy(const bool isBusy)
int FMVipWnd::exec() int FMVipWnd::exec()
{ {
showNormal(); showFullScreen();
::SetForegroundWindow((HWND)effectiveWinId()); ::SetForegroundWindow((HWND)effectiveWinId());
::SetWindowPos( (HWND)effectiveWinId(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); ::SetWindowPos( (HWND)effectiveWinId(), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
showNormal(); showFullScreen();
::SetForegroundWindow((HWND)effectiveWinId()); ::SetForegroundWindow((HWND)effectiveWinId());
QDesktopWidget w; QDesktopWidget w;
...@@ -143,12 +144,12 @@ long FMVipWnd::winNCHitTest(MSG *msg) ...@@ -143,12 +144,12 @@ long FMVipWnd::winNCHitTest(MSG *msg)
bool fOnResizeBorder = false; bool fOnResizeBorder = false;
//! Test caption area //! Test caption area
QRegion m_children_region(0, 0, width() - 54, 60); // QRegion m_children_region(0, 0, width() - 54, 60);
QRegion new_region = m_children_region.translated(window_rect.x() , window_rect.y()); // QRegion new_region = m_children_region.translated(window_rect.x() , window_rect.y());
if (new_region.contains(mouse_pos)) { // if (new_region.contains(mouse_pos)) {
//! Title regions contains the mouse position, treat it as caption area // //! Title regions contains the mouse position, treat it as caption area
uRow = 0; // uRow = 0;
} // }
// Hit test (HTTOPLEFT, ... HTBOTTOMRIGHT) // Hit test (HTTOPLEFT, ... HTBOTTOMRIGHT)
LRESULT hitTests[3][3] = LRESULT hitTests[3][3] =
......
...@@ -6,16 +6,10 @@ ...@@ -6,16 +6,10 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>968</width> <width>999</width>
<height>768</height> <height>999</height>
</rect> </rect>
</property> </property>
<property name="maximumSize">
<size>
<width>968</width>
<height>768</height>
</size>
</property>
<property name="sizeIncrement"> <property name="sizeIncrement">
<size> <size>
<width>0</width> <width>0</width>
...@@ -29,14 +23,18 @@ ...@@ -29,14 +23,18 @@
<string>FMVipPanel</string> <string>FMVipPanel</string>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget { <string notr="true">#FMVipFund {
background:rgba(100,100,100,80);
}
#FMVipWnd {
background: rgb(255,255,255);
}
QWidget {
font: normal 22px &quot;Microsoft YaHei&quot;; font: normal 22px &quot;Microsoft YaHei&quot;;
color: rgb(90,90,90); color: rgb(90,90,90);
} }
#FMVipFund {
background: rgb(246,246,246);
border: 1 solid silver;
}
/* /*
* 标题栏 * 标题栏
...@@ -142,6 +140,15 @@ QPushButton#fund_btn:hover { ...@@ -142,6 +140,15 @@ QPushButton#fund_btn:hover {
} }
</string> </string>
</property> </property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QWidget" name="FMVipWnd" native="true">
<property name="maximumSize">
<size>
<width>950</width>
<height>750</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
...@@ -635,6 +642,9 @@ QPushButton#fund_btn:hover { ...@@ -635,6 +642,9 @@ QPushButton#fund_btn:hover {
<property name="text"> <property name="text">
<string>50</string> <string>50</string>
</property> </property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
...@@ -720,6 +730,9 @@ QPushButton#fund_btn:hover { ...@@ -720,6 +730,9 @@ QPushButton#fund_btn:hover {
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<resources/> <resources/>
<connections/> <connections/>
......
...@@ -6,22 +6,10 @@ ...@@ -6,22 +6,10 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>640</width> <width>800</width>
<height>480</height> <height>600</height>
</rect> </rect>
</property> </property>
<property name="maximumSize">
<size>
<width>968</width>
<height>768</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="mouseTracking"> <property name="mouseTracking">
<bool>false</bool> <bool>false</bool>
</property> </property>
...@@ -29,7 +17,15 @@ ...@@ -29,7 +17,15 @@
<string>FMVipPanel</string> <string>FMVipPanel</string>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget { <string notr="true">#FMVipLogin {
background: rgba(100,100,100, 80);
}
#FMVipWnd {
background: rgb(255, 255, 255);
}
QWidget {
font: normal 22px &quot;Microsoft YaHei&quot;; font: normal 22px &quot;Microsoft YaHei&quot;;
color: rgb(90,90,90); color: rgb(90,90,90);
} }
...@@ -111,7 +107,37 @@ ...@@ -111,7 +107,37 @@
} }
</string> </string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QWidget" name="FMVipWnd" native="true">
<property name="minimumSize">
<size>
<width>640</width>
<height>480</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>640</width>
<height>480</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
...@@ -304,7 +330,7 @@ font: 13px &quot;微软雅黑&quot;; ...@@ -304,7 +330,7 @@ font: 13px &quot;微软雅黑&quot;;
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>40</height> <height>109</height>
</size> </size>
</property> </property>
</spacer> </spacer>
...@@ -400,12 +426,10 @@ font: 13px &quot;微软雅黑&quot;; ...@@ -400,12 +426,10 @@ font: 13px &quot;微软雅黑&quot;;
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>login_edit</tabstop>
<tabstop>login_btn</tabstop>
<tabstop>close_btn</tabstop>
</tabstops>
<resources/> <resources/>
<connections/> <connections/>
</ui> </ui>
...@@ -10,12 +10,6 @@ ...@@ -10,12 +10,6 @@
<height>768</height> <height>768</height>
</rect> </rect>
</property> </property>
<property name="maximumSize">
<size>
<width>968</width>
<height>768</height>
</size>
</property>
<property name="sizeIncrement"> <property name="sizeIncrement">
<size> <size>
<width>0</width> <width>0</width>
...@@ -29,7 +23,15 @@ ...@@ -29,7 +23,15 @@
<string>FMVipOrder</string> <string>FMVipOrder</string>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget { <string notr="true">#FMVipOrder {
background: rgba(100,100,100,80);
}
#FMVipWnd {
background: rgb(255,255,255);
}
QWidget {
font: normal 22px &quot;Microsoft YaHei&quot;; font: normal 22px &quot;Microsoft YaHei&quot;;
color: rgb(90,90,90); color: rgb(90,90,90);
} }
...@@ -283,6 +285,15 @@ ...@@ -283,6 +285,15 @@
margin: 0 6 10 6; margin: 0 6 10 6;
}</string> }</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QWidget" name="FMVipWnd" native="true">
<property name="maximumSize">
<size>
<width>950</width>
<height>750</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
...@@ -924,6 +935,9 @@ font: 13px &quot;微软雅黑&quot;; ...@@ -924,6 +935,9 @@ font: 13px &quot;微软雅黑&quot;;
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<resources/> <resources/>
<connections/> <connections/>
......
...@@ -10,12 +10,6 @@ ...@@ -10,12 +10,6 @@
<height>768</height> <height>768</height>
</rect> </rect>
</property> </property>
<property name="maximumSize">
<size>
<width>968</width>
<height>768</height>
</size>
</property>
<property name="sizeIncrement"> <property name="sizeIncrement">
<size> <size>
<width>0</width> <width>0</width>
...@@ -29,13 +23,15 @@ ...@@ -29,13 +23,15 @@
<string>FMVipPanel</string> <string>FMVipPanel</string>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QWidget { <string notr="true">#FMVipPanel {
background: rgba(100,100,100,80);
}
QWidget {
font: normal 22px &quot;Microsoft YaHei&quot;; font: normal 22px &quot;Microsoft YaHei&quot;;
color: rgb(90,90,90); color: rgb(90,90,90);
} }
#FMVipPanel { #FMVipWnd {
background: rgb(246,246,246); background: rgb(255,255,255);
border: 1 solid silver;
} }
/* /*
...@@ -192,6 +188,15 @@ ...@@ -192,6 +188,15 @@
} }
</string> </string>
</property> </property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QWidget" name="FMVipWnd" native="true">
<property name="maximumSize">
<size>
<width>950</width>
<height>750</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
...@@ -588,6 +593,9 @@ ...@@ -588,6 +593,9 @@
</item> </item>
</layout> </layout>
</widget> </widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<resources/> <resources/>
<connections/> <connections/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment