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] =
......
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