mirror of
https://github.com/koloideal/Casha.git
synced 2026-06-10 18:35:28 +03:00
update
This commit is contained in:
@@ -30,8 +30,8 @@ class _FullScreenBlurOverlayState extends State<FullScreenBlurOverlay> {
|
|||||||
final mq = MediaQuery.of(widget.context);
|
final mq = MediaQuery.of(widget.context);
|
||||||
final cardTop = mq.padding.top + kToolbarHeight + 16;
|
final cardTop = mq.padding.top + kToolbarHeight + 16;
|
||||||
const cardHeight = 220.0;
|
const cardHeight = 220.0;
|
||||||
final panelTop = cardTop + cardHeight + 32;
|
final panelTop = cardTop + cardHeight + 82;
|
||||||
const panelHeight = 460.0;
|
const panelHeight = 410.0;
|
||||||
|
|
||||||
return Material(
|
return Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
@@ -110,10 +110,10 @@ class _FullScreenBlurOverlayState extends State<FullScreenBlurOverlay> {
|
|||||||
dash.overlayEntry?.markNeedsBuild();
|
dash.overlayEntry?.markNeedsBuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
final currentHSV = dash.editingPrimary
|
final isSolid = dash.tempGradientType == GradientType.solid;
|
||||||
|
final currentHSV = (isSolid || dash.editingPrimary)
|
||||||
? dash.tempPrimaryHSV
|
? dash.tempPrimaryHSV
|
||||||
: dash.tempSecondaryHSV;
|
: dash.tempSecondaryHSV;
|
||||||
final isSolid = dash.tempGradientType == GradientType.solid;
|
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(16, 14, 16, 14),
|
padding: const EdgeInsets.fromLTRB(16, 14, 16, 14),
|
||||||
@@ -170,9 +170,13 @@ class _FullScreenBlurOverlayState extends State<FullScreenBlurOverlay> {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
dash.setState(() {
|
dash.setState(() {
|
||||||
dash.tempGradientType = isSolid
|
if (isSolid) {
|
||||||
? GradientType.linear
|
dash.tempGradientType = GradientType.linear;
|
||||||
: GradientType.solid;
|
// keep editingPrimary as is when turning off
|
||||||
|
} else {
|
||||||
|
dash.tempGradientType = GradientType.solid;
|
||||||
|
dash.editingPrimary = true; // ALWAYS switch to primary when entering Solid
|
||||||
|
}
|
||||||
});
|
});
|
||||||
setPanelState(() {});
|
setPanelState(() {});
|
||||||
dash.overlayEntry?.markNeedsBuild();
|
dash.overlayEntry?.markNeedsBuild();
|
||||||
@@ -233,7 +237,7 @@ class _FullScreenBlurOverlayState extends State<FullScreenBlurOverlay> {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (lbCtx, constraints) {
|
builder: (lbCtx, constraints) {
|
||||||
const reservedBelow = 62.0;
|
const reservedBelow = 66.0;
|
||||||
final spectrumH =
|
final spectrumH =
|
||||||
(constraints.maxHeight - reservedBelow).clamp(
|
(constraints.maxHeight - reservedBelow).clamp(
|
||||||
40.0, double.infinity);
|
40.0, double.infinity);
|
||||||
@@ -254,23 +258,11 @@ class _FullScreenBlurOverlayState extends State<FullScreenBlurOverlay> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Theme(
|
ClipRect(
|
||||||
data: Theme.of(widget.context).copyWith(
|
child: SizedBox(
|
||||||
sliderTheme: const SliderThemeData(
|
height: 24,
|
||||||
thumbShape: RoundSliderThumbShape(
|
|
||||||
enabledThumbRadius: 8,
|
|
||||||
elevation: 0,
|
|
||||||
pressedElevation: 0,
|
|
||||||
),
|
|
||||||
overlayShape: RoundSliderOverlayShape(
|
|
||||||
overlayRadius: 0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(6),
|
borderRadius: BorderRadius.circular(6),
|
||||||
child: SizedBox(
|
|
||||||
height: 20,
|
|
||||||
child: ColorPickerSlider(
|
child: ColorPickerSlider(
|
||||||
TrackType.hue,
|
TrackType.hue,
|
||||||
currentHSV,
|
currentHSV,
|
||||||
|
|||||||
Reference in New Issue
Block a user