make storybook a tabbed window
This commit is contained in:
parent
8aced615ce
commit
32167ef44e
8 changed files with 279 additions and 207 deletions
44
components/StyledTabButton.qml
Normal file
44
components/StyledTabButton.qml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import qs.config
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Basic
|
||||
|
||||
TabButton {
|
||||
id: control
|
||||
|
||||
contentItem: Text {
|
||||
id: icon
|
||||
font.pixelSize: Styling.typography.textSize.base
|
||||
font.family: Styling.typography.fontFamily
|
||||
text: control.text
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
color: control.hovered ? Styling.theme.primarycontent : Styling.theme.basecontent
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Styling.animations.speed.normal
|
||||
}
|
||||
}
|
||||
rotation: control.rotation
|
||||
Behavior on rotation {
|
||||
RotationAnimation {
|
||||
duration: Styling.animations.speed.slow
|
||||
easing.type: Easing.OutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: rectangle
|
||||
color: control.hovered ? Styling.theme.primary : Styling.theme.base200
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Styling.animations.speed.normal
|
||||
}
|
||||
}
|
||||
// radius: Styling.theme.radiusField
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue