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