Compare commits
No commits in common. "3849ace771448e13662227481572781001061e3c" and "1a48510a1b6a742ee6ff8fb88414197f675c71d6" have entirely different histories.
3849ace771
...
1a48510a1b
|
@ -7,7 +7,7 @@ RibbonBlur {
|
|||
id: control
|
||||
parent: Overlay.overlay
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: folded ? barHeight : Window.window.viewItems.height
|
||||
implicitHeight: 30
|
||||
maskColor: folded && !handler.visible ? "transparent" : RibbonTheme.isDarkMode ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||
maskOpacity: 0
|
||||
bottomLeftRadius: folded ? 0 : 5
|
||||
|
@ -15,8 +15,7 @@ RibbonBlur {
|
|||
enableEffect: handler.visible || !folded
|
||||
readonly property alias folded: folded_btn.checked
|
||||
property int animationTime: 400
|
||||
property real currentMessageHeight: message_list.currentItem ? message_list.currentItem.height : 36
|
||||
property real barHeight: 36
|
||||
property real barHeight: implicitHeight - handler.height
|
||||
property alias messageModel: messageModel
|
||||
property real topMargin: RibbonTheme.modernStyle ? 5 : 0
|
||||
|
||||
|
@ -68,7 +67,7 @@ RibbonBlur {
|
|||
onIsCurrentItemChanged: {
|
||||
if(folded){
|
||||
message_list.height = item.implicitHeight
|
||||
control.barHeight = item.implicitHeight + handler.height
|
||||
control.implicitHeight = item.implicitHeight + handler.height
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,7 +110,7 @@ RibbonBlur {
|
|||
onImplicitHeightChanged:{
|
||||
if(message_list.currentIndex === index && folded){
|
||||
message_list.height = item.implicitHeight
|
||||
control.barHeight = item.implicitHeight + handler.height
|
||||
control.implicitHeight = item.implicitHeight + handler.height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +119,7 @@ RibbonBlur {
|
|||
add: Transition {
|
||||
NumberAnimation {
|
||||
properties: "y"
|
||||
from: -message_list.height
|
||||
from: message_list.height
|
||||
duration: control.animationTime
|
||||
}
|
||||
}
|
||||
|
@ -158,7 +157,7 @@ RibbonBlur {
|
|||
y: message_list.y + message_list.height * (folded ? 1 : 0)
|
||||
implicitHeight: folded ? 10 : 20
|
||||
implicitWidth: parent.width
|
||||
visible: hover.hovered && messageModel.count > 1
|
||||
visible: hover.hovered && messageModel.count
|
||||
color: RibbonTheme.isDarkMode ? Qt.rgba(0,0,0,0.5) : Qt.rgba(1,1,1,0.5)
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
@ -193,10 +192,12 @@ RibbonBlur {
|
|||
textColor: RibbonTheme.isDarkMode ? "white" : "black"
|
||||
onClicked:{
|
||||
if(!folded){
|
||||
control.implicitHeight = Window.window.viewItems.height - control.x
|
||||
message_list.height = control.implicitHeight
|
||||
}
|
||||
else{
|
||||
message_list.height = message_list.currentItem.implicitHeight
|
||||
control.implicitHeight = message_list.currentItem.implicitHeight + handler.height
|
||||
auto_scroll_btn_timer.restart()
|
||||
}
|
||||
}
|
||||
|
@ -242,8 +243,7 @@ RibbonBlur {
|
|||
folded_btn.checked = true
|
||||
messageModel.clear()
|
||||
implicitHeight = 0
|
||||
barHeight = folded ? handler.height : 0
|
||||
currentMessageHeight = 0
|
||||
barHeight = 0
|
||||
message_list.height = 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,6 @@ Item {
|
|||
Shape {
|
||||
id: shape
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
layer.samples: 4 // Workaround for Qt 6.5 and below, for Qt 6.6, just set "preferredRendererType" to "Shape.CurveRenderer"
|
||||
ShapePath {
|
||||
capStyle: ShapePath.RoundCap
|
||||
strokeWidth: 0
|
||||
|
@ -41,11 +39,9 @@ Item {
|
|||
width: shape.width
|
||||
height: shape.height
|
||||
anchors.centerIn: parent
|
||||
layer.enabled: true
|
||||
layer.samples: 4
|
||||
ShapePath {
|
||||
capStyle: ShapePath.RoundCap
|
||||
strokeWidth: control.borderWidth * 2
|
||||
strokeWidth: control.borderWidth
|
||||
strokeColor: control.borderColor
|
||||
fillColor: "transparent"
|
||||
joinStyle: ShapePath.RoundJoin
|
||||
|
|
|
@ -40,7 +40,7 @@ Item {
|
|||
if(Window.window.tabBar)
|
||||
w += Math.abs(Window.window.tabBar.height - Window.window.tabBar.modernMargin)
|
||||
if(Window.window.messageBar)
|
||||
w += (Window.window.messageBar.folded ? Window.window.messageBar.currentMessageHeight : 0) + Window.window.messageBar.topMargin
|
||||
w += (Window.window.messageBar.folded ? Window.window.messageBar.barHeight + Window.window.messageBar.topMargin : 0)
|
||||
}
|
||||
return w
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ RibbonBlur {
|
|||
id: control
|
||||
parent: Overlay.overlay
|
||||
implicitWidth: parent.width
|
||||
implicitHeight: folded ? barHeight : Window.window.viewItems.height
|
||||
implicitHeight: 30
|
||||
maskColor: folded && !handler.visible ? "transparent" : RibbonTheme.isDarkMode ? Qt.rgba(0,0,0,1) : Qt.rgba(1,1,1,1)
|
||||
maskOpacity: 0
|
||||
bottomLeftRadius: folded ? 0 : 5
|
||||
|
@ -15,8 +15,7 @@ RibbonBlur {
|
|||
enableEffect: handler.visible || !folded
|
||||
readonly property alias folded: folded_btn.checked
|
||||
property int animationTime: 400
|
||||
property real currentMessageHeight: message_list.currentItem ? message_list.currentItem.height : 36
|
||||
property real barHeight: 36
|
||||
property real barHeight: implicitHeight - handler.height
|
||||
property alias messageModel: messageModel
|
||||
property real topMargin: RibbonTheme.modernStyle ? 5 : 0
|
||||
|
||||
|
@ -68,7 +67,7 @@ RibbonBlur {
|
|||
onIsCurrentItemChanged: {
|
||||
if(folded){
|
||||
message_list.height = item.implicitHeight
|
||||
control.barHeight = item.implicitHeight + handler.height
|
||||
control.implicitHeight = item.implicitHeight + handler.height
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,7 +110,7 @@ RibbonBlur {
|
|||
onImplicitHeightChanged:{
|
||||
if(message_list.currentIndex === index && folded){
|
||||
message_list.height = item.implicitHeight
|
||||
control.barHeight = item.implicitHeight + handler.height
|
||||
control.implicitHeight = item.implicitHeight + handler.height
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -120,7 +119,7 @@ RibbonBlur {
|
|||
add: Transition {
|
||||
NumberAnimation {
|
||||
properties: "y"
|
||||
from: -message_list.height
|
||||
from: message_list.height
|
||||
duration: control.animationTime
|
||||
}
|
||||
}
|
||||
|
@ -158,7 +157,7 @@ RibbonBlur {
|
|||
y: message_list.y + message_list.height * (folded ? 1 : 0)
|
||||
implicitHeight: folded ? 10 : 20
|
||||
implicitWidth: parent.width
|
||||
visible: hover.hovered && messageModel.count > 1
|
||||
visible: hover.hovered && messageModel.count
|
||||
color: RibbonTheme.isDarkMode ? Qt.rgba(0,0,0,0.5) : Qt.rgba(1,1,1,0.5)
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
@ -193,10 +192,12 @@ RibbonBlur {
|
|||
textColor: RibbonTheme.isDarkMode ? "white" : "black"
|
||||
onClicked:{
|
||||
if(!folded){
|
||||
control.implicitHeight = Window.window.viewItems.height - control.x
|
||||
message_list.height = control.implicitHeight
|
||||
}
|
||||
else{
|
||||
message_list.height = message_list.currentItem.implicitHeight
|
||||
control.implicitHeight = message_list.currentItem.implicitHeight + handler.height
|
||||
auto_scroll_btn_timer.restart()
|
||||
}
|
||||
}
|
||||
|
@ -242,8 +243,7 @@ RibbonBlur {
|
|||
folded_btn.checked = true
|
||||
messageModel.clear()
|
||||
implicitHeight = 0
|
||||
barHeight = folded ? handler.height : 0
|
||||
currentMessageHeight = 0
|
||||
barHeight = 0
|
||||
message_list.height = 0
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@ Item {
|
|||
Shape {
|
||||
id: shape
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
layer.samples: 4 // Workaround for Qt 6.5 and below, for Qt 6.6, just set "preferredRendererType" to "Shape.CurveRenderer"
|
||||
ShapePath {
|
||||
capStyle: ShapePath.RoundCap
|
||||
strokeWidth: 0
|
||||
|
@ -43,11 +41,9 @@ Item {
|
|||
width: shape.width
|
||||
height: shape.height
|
||||
anchors.centerIn: parent
|
||||
layer.enabled: true
|
||||
layer.samples: 4
|
||||
ShapePath {
|
||||
capStyle: ShapePath.RoundCap
|
||||
strokeWidth: control.borderWidth * 2
|
||||
strokeWidth: control.borderWidth
|
||||
strokeColor: control.borderColor
|
||||
fillColor: "transparent"
|
||||
joinStyle: ShapePath.RoundJoin
|
||||
|
|
|
@ -40,7 +40,7 @@ Item {
|
|||
if(Window.window.tabBar)
|
||||
w += Math.abs(Window.window.tabBar.height - Window.window.tabBar.modernMargin)
|
||||
if(Window.window.messageBar)
|
||||
w += (Window.window.messageBar.folded ? Window.window.messageBar.currentMessageHeight : 0) + Window.window.messageBar.topMargin
|
||||
w += (Window.window.messageBar.folded ? Window.window.messageBar.barHeight + Window.window.messageBar.topMargin : 0)
|
||||
}
|
||||
return w
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue