-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(StatusTab[Bar,Button]): UI updates
- fixup margins and padding according to latest Figma designs - make a difference between a disabled and inactive tab by using opacity - provide smooth color transitions - add a dedicated StoryBook page
- Loading branch information
Showing
4 changed files
with
89 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import QtQuick 2.15 | ||
|
||
import StatusQ.Controls 0.1 | ||
|
||
Item { | ||
id: root | ||
|
||
Rectangle { | ||
width: tabbar.childrenRect.width | ||
height: tabbar.childrenRect.height | ||
anchors.centerIn: parent | ||
color: "transparent" | ||
border.width: 1 | ||
border.color: "pink" | ||
|
||
StatusTabBar { | ||
id: tabbar | ||
anchors.centerIn: parent | ||
|
||
StatusTabButton { | ||
width: implicitWidth | ||
text: "Contacts" | ||
} | ||
StatusTabButton { | ||
width: implicitWidth | ||
text: "Pending contacts" | ||
badge.value: 2 | ||
} | ||
StatusTabButton { | ||
width: implicitWidth | ||
enabled: false | ||
text: qsTr("Blocked & disabled") | ||
} | ||
StatusTabButton { | ||
width: implicitWidth | ||
text: "Misc" | ||
} | ||
} | ||
} | ||
} | ||
|
||
// category: Controls | ||
// status: good |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import QtQuick 2.0 | ||
import QtQuick.Controls 2.13 | ||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
|
||
import StatusQ.Core.Theme 0.1 | ||
|
||
/*! | ||
\qmltype StatusTabButton | ||
\inherits TabButton | ||
\qmltype StatusTabBar | ||
\inherits TabBar | ||
\inqmlmodule StatusQ.Controls | ||
\since StatusQ.Controls 0.1 | ||
\brief StatusTabBar provides a tab-based navigation model | ||
It's customized from Qt's \l{https://doc.qt.io/qt-6/qml-qtquick-controls2-tabbar.html}{TabBar}, | ||
It's customized from Qt's \l{https://doc.qt.io/qt-5/qml-qtquick-controls2-tabbar.html}{TabBar}, | ||
adding a transparent background. | ||
*/ | ||
|
||
|
||
TabBar { | ||
background: Item { } | ||
spacing: Theme.bigPadding | ||
background: null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters