From 962cef9346ee72526568e182b798b6524c34d682 Mon Sep 17 00:00:00 2001 From: jared Date: Wed, 8 Jul 2020 20:12:52 +0800 Subject: [PATCH] use radius --- examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml | 1 + examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml | 6 ++---- examples/TaoQuickShow/Src/TaoView.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml b/examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml index bb16437..5f1f0af 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/LangBtn.qml @@ -26,6 +26,7 @@ TImageBtn { text: trans.trans(modelData) + trans.transString color: trans.currentLang === modelData ? gConfig.themeColor :( containsMouse ? "lightgray" : pop.barColor) textColor: gConfig.textColor + radius: 4 onClicked: { // pop.hide() trans.setCurrentLang(modelData) diff --git a/examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml b/examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml index 0a8fd12..b0da971 100644 --- a/examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml +++ b/examples/TaoQuickShow/Qml/Page/Biz/SkinBtn.qml @@ -13,6 +13,7 @@ TImageBtn { barColor: gConfig.reserverColor backgroundWidth: 280 backgroundHeight: 180 + borderColor: gConfig.themeColor contentItem: GridView { anchors.fill: parent anchors.margins: 10 @@ -38,10 +39,7 @@ TImageBtn { } Text { anchors { - left: parent.left - bottom: parent.bottom - leftMargin: 8 - bottomMargin: 8 + centerIn: parent } color: "white" text: trans.trans(model.name) + trans.transString diff --git a/examples/TaoQuickShow/Src/TaoView.cpp b/examples/TaoQuickShow/Src/TaoView.cpp index 20f3148..f0fbed6 100644 --- a/examples/TaoQuickShow/Src/TaoView.cpp +++ b/examples/TaoQuickShow/Src/TaoView.cpp @@ -135,7 +135,7 @@ bool TaoView::nativeEvent(const QByteArray& eventType, void* message, long* resu } double dpr = qApp->devicePixelRatio(); QPoint pos = mapFromGlobal(QPoint(x/dpr,y/dpr)); - QRect titleRect(border_width, border_width, width() * 0.8, 40); + QRect titleRect(border_width, border_width, width() * 0.8, 50); if (titleRect.contains(pos)) { *result = HTCAPTION;