Commit d68793a5 by NitefullWind

界面外加入阴影背景。

parent c4310cba
......@@ -15,6 +15,7 @@ FMVipLogin::FMVipLogin(QDialog *parent) :
connect(this, &FMVipLogin::startreader, &m_reader, &Reader::readVipNO);
connect(&m_reader, &Reader::getVipNO, this, &FMVipLogin::readVipNO);
emit startreader();
ui->login_edit->setFocus();
qDebug() << "main:" <<QThread::currentThreadId();
}
......@@ -113,7 +114,7 @@ void FMVipLogin::on_login_key_clicked()
connect(numpad, &FMNumPad::digit_confirm, this, &FMVipLogin::on_confirm_clicked);
}
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)
......
......@@ -180,7 +180,7 @@ void FMVipOrder::on_pay_key_clicked()
connect(numpad, &FMNumPad::digit_confirm, this, &FMVipOrder::on_confirm_clicked);
}
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()
......
......@@ -14,6 +14,7 @@ FMVipWnd::FMVipWnd(QDialog *parent) :
loadingWindow(new FMLoading(this))
{
setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
setAttribute(Qt::WA_TranslucentBackground);
setAttribute(Qt::WA_QuitOnClose, false);
setAttribute(Qt::WA_DeleteOnClose, false);
setIsBusy(false);
......@@ -49,12 +50,12 @@ void FMVipWnd::setIsBusy(const bool isBusy)
int FMVipWnd::exec()
{
showNormal();
showFullScreen();
::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());
QDesktopWidget w;
......@@ -143,12 +144,12 @@ long FMVipWnd::winNCHitTest(MSG *msg)
bool fOnResizeBorder = false;
//! Test caption area
QRegion m_children_region(0, 0, width() - 54, 60);
QRegion new_region = m_children_region.translated(window_rect.x() , window_rect.y());
if (new_region.contains(mouse_pos)) {
//! Title regions contains the mouse position, treat it as caption area
uRow = 0;
}
// QRegion m_children_region(0, 0, width() - 54, 60);
// QRegion new_region = m_children_region.translated(window_rect.x() , window_rect.y());
// if (new_region.contains(mouse_pos)) {
// //! Title regions contains the mouse position, treat it as caption area
// uRow = 0;
// }
// Hit test (HTTOPLEFT, ... HTBOTTOMRIGHT)
LRESULT hitTests[3][3] =
......
......@@ -6,16 +6,10 @@
<rect>
<x>0</x>
<y>0</y>
<width>968</width>
<height>768</height>
<width>999</width>
<height>999</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>968</width>
<height>768</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
......@@ -29,14 +23,18 @@
<string>FMVipPanel</string>
</property>
<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;;
color: rgb(90,90,90);
}
#FMVipFund {
background: rgb(246,246,246);
border: 1 solid silver;
}
/*
* 标题栏
......@@ -142,6 +140,15 @@ QPushButton#fund_btn:hover {
}
</string>
</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">
<property name="spacing">
<number>0</number>
......@@ -635,6 +642,9 @@ QPushButton#fund_btn:hover {
<property name="text">
<string>50</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
......@@ -720,6 +730,9 @@ QPushButton#fund_btn:hover {
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
......
......@@ -6,22 +6,10 @@
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>480</height>
<width>800</width>
<height>600</height>
</rect>
</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">
<bool>false</bool>
</property>
......@@ -29,7 +17,15 @@
<string>FMVipPanel</string>
</property>
<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;;
color: rgb(90,90,90);
}
......@@ -111,7 +107,37 @@
}
</string>
</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">
<number>0</number>
</property>
......@@ -304,7 +330,7 @@ font: 13px &quot;微软雅黑&quot;;
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>109</height>
</size>
</property>
</spacer>
......@@ -400,12 +426,10 @@ font: 13px &quot;微软雅黑&quot;;
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>
<tabstop>login_edit</tabstop>
<tabstop>login_btn</tabstop>
<tabstop>close_btn</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>
......@@ -10,12 +10,6 @@
<height>768</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>968</width>
<height>768</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
......@@ -29,7 +23,15 @@
<string>FMVipOrder</string>
</property>
<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;;
color: rgb(90,90,90);
}
......@@ -283,6 +285,15 @@
margin: 0 6 10 6;
}</string>
</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">
<property name="spacing">
<number>0</number>
......@@ -924,6 +935,9 @@ font: 13px &quot;微软雅黑&quot;;
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
......
......@@ -10,12 +10,6 @@
<height>768</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>968</width>
<height>768</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
......@@ -29,13 +23,15 @@
<string>FMVipPanel</string>
</property>
<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;;
color: rgb(90,90,90);
}
#FMVipPanel {
background: rgb(246,246,246);
border: 1 solid silver;
#FMVipWnd {
background: rgb(255,255,255);
}
/*
......@@ -192,6 +188,15 @@
}
</string>
</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">
<property name="spacing">
<number>0</number>
......@@ -588,6 +593,9 @@
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<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