mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
revert: dm color panel
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -88,18 +88,18 @@ class _SendDanmakuPanelState extends CommonPublishPageState<SendDanmakuPanel> {
|
|||||||
|
|
||||||
get _buildColorPanel => Expanded(
|
get _buildColorPanel => Expanded(
|
||||||
child: Obx(
|
child: Obx(
|
||||||
() => Builder(
|
() => LayoutBuilder(
|
||||||
key: ValueKey(_color.value),
|
key: ValueKey(_color.value),
|
||||||
builder: (context) {
|
builder: (context, constraints) {
|
||||||
|
final int crossAxisCount = (constraints.maxWidth / 40).toInt();
|
||||||
final bool isCustomColor = _colorList.contains(_color.value).not;
|
final bool isCustomColor = _colorList.contains(_color.value).not;
|
||||||
final int length =
|
final int length =
|
||||||
_colorList.length + (isCustomColor ? 1 : 0) + 1;
|
_colorList.length + (isCustomColor ? 1 : 0) + 1;
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
gridDelegate: SliverGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
maxCrossAxisExtent: 40,
|
crossAxisCount: crossAxisCount,
|
||||||
mainAxisExtent: 40,
|
|
||||||
crossAxisSpacing: 4,
|
crossAxisSpacing: 4,
|
||||||
mainAxisSpacing: 4,
|
mainAxisSpacing: 4,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user