Possible ram improvement, move settings into sidebar
This commit is contained in:
parent
61e852ed51
commit
3f6bc3414d
17 changed files with 795 additions and 2454 deletions
|
|
@ -16,33 +16,33 @@ Shape {
|
|||
|
||||
property var modelData: null
|
||||
|
||||
// Position flags derived from position string
|
||||
property bool _isTop: position.includes("top")
|
||||
property bool _isLeft: position.includes("left")
|
||||
property bool _isRight: position.includes("right")
|
||||
property bool _isBottom: position.includes("bottom")
|
||||
// Position flags derived from position string - calculated once
|
||||
readonly property bool _isTop: position.includes("top")
|
||||
readonly property bool _isLeft: position.includes("left")
|
||||
readonly property bool _isRight: position.includes("right")
|
||||
readonly property bool _isBottom: position.includes("bottom")
|
||||
|
||||
// Shift the path vertically if offsetY is negative to pull shape up
|
||||
property real pathOffsetY: Math.min(offsetY, 0)
|
||||
readonly property real pathOffsetY: Math.min(offsetY, 0)
|
||||
|
||||
// Base coordinates for left corner shape, shifted by pathOffsetY vertically
|
||||
property real _baseStartX: 30 * size
|
||||
property real _baseStartY: (_isTop ? 20 * size : 0) + pathOffsetY
|
||||
property real _baseLineX: 30 * size
|
||||
property real _baseLineY: (_isTop ? 0 : 20 * size) + pathOffsetY
|
||||
property real _baseArcX: 50 * size
|
||||
property real _baseArcY: (_isTop ? 20 * size : 0) + pathOffsetY
|
||||
readonly property real _baseStartX: 30 * size
|
||||
readonly property real _baseStartY: (_isTop ? 20 * size : 0) + pathOffsetY
|
||||
readonly property real _baseLineX: 30 * size
|
||||
readonly property real _baseLineY: (_isTop ? 0 : 20 * size) + pathOffsetY
|
||||
readonly property real _baseArcX: 50 * size
|
||||
readonly property real _baseArcY: (_isTop ? 20 * size : 0) + pathOffsetY
|
||||
|
||||
// Mirror coordinates for right corners
|
||||
property real _startX: _isRight ? (concaveWidth - _baseStartX) : _baseStartX
|
||||
property real _startY: _baseStartY
|
||||
property real _lineX: _isRight ? (concaveWidth - _baseLineX) : _baseLineX
|
||||
property real _lineY: _baseLineY
|
||||
property real _arcX: _isRight ? (concaveWidth - _baseArcX) : _baseArcX
|
||||
property real _arcY: _baseArcY
|
||||
readonly property real _startX: _isRight ? (concaveWidth - _baseStartX) : _baseStartX
|
||||
readonly property real _startY: _baseStartY
|
||||
readonly property real _lineX: _isRight ? (concaveWidth - _baseLineX) : _baseLineX
|
||||
readonly property real _lineY: _baseLineY
|
||||
readonly property real _arcX: _isRight ? (concaveWidth - _baseArcX) : _baseArcX
|
||||
readonly property real _arcY: _baseArcY
|
||||
|
||||
// Arc direction varies by corner to maintain proper concave shape
|
||||
property int _arcDirection: {
|
||||
readonly property int _arcDirection: {
|
||||
if (_isTop && _isLeft) return PathArc.Counterclockwise
|
||||
if (_isTop && _isRight) return PathArc.Clockwise
|
||||
if (_isBottom && _isLeft) return PathArc.Clockwise
|
||||
|
|
@ -57,9 +57,10 @@ Shape {
|
|||
x: _isLeft ? offsetX : (parent ? parent.width - width + offsetX : 0)
|
||||
y: _isTop ? offsetY : (parent ? parent.height - height + offsetY : 0)
|
||||
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
layer.enabled: true
|
||||
layer.samples: 4
|
||||
// Optimized rendering settings - reduced quality for better performance
|
||||
preferredRendererType: Shape.GeometryRenderer // Use simpler renderer
|
||||
layer.enabled: false // Disable layer rendering to save memory
|
||||
antialiasing: true // Use standard antialiasing instead of MSAA
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue