fix: physical pixel border
This commit is contained in:
parent
891ca417cd
commit
42f67c3ed1
|
@ -113,7 +113,7 @@ class ThemeModel with ChangeNotifier {
|
||||||
tertiaryText: PrimerColors.gray500,
|
tertiaryText: PrimerColors.gray500,
|
||||||
background: PrimerColors.white,
|
background: PrimerColors.white,
|
||||||
grayBackground: PrimerColors.gray100,
|
grayBackground: PrimerColors.gray100,
|
||||||
border: PrimerColors.gray100,
|
border: Colors.grey.shade400,
|
||||||
);
|
);
|
||||||
case Brightness.dark:
|
case Brightness.dark:
|
||||||
return Palette(
|
return Palette(
|
||||||
|
@ -123,7 +123,7 @@ class ThemeModel with ChangeNotifier {
|
||||||
tertiaryText: PrimerColors.gray500,
|
tertiaryText: PrimerColors.gray500,
|
||||||
background: PrimerColors.black,
|
background: PrimerColors.black,
|
||||||
grayBackground: PrimerColors.gray800,
|
grayBackground: PrimerColors.gray800,
|
||||||
border: PrimerColors.gray900,
|
border: Colors.grey.shade600,
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -7,7 +7,7 @@ class BorderView extends StatelessWidget {
|
||||||
final double leftPadding;
|
final double leftPadding;
|
||||||
|
|
||||||
BorderView({
|
BorderView({
|
||||||
this.height = 1,
|
this.height,
|
||||||
this.leftPadding = 0,
|
this.leftPadding = 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -15,6 +15,18 @@ class BorderView extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = Provider.of<ThemeModel>(context);
|
final theme = Provider.of<ThemeModel>(context);
|
||||||
|
|
||||||
|
if (height == null) {
|
||||||
|
// Physical pixel
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(left: leftPadding),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
top: BorderSide(color: theme.palette.border, width: 0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return Row(
|
return Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
@ -34,15 +46,5 @@ class BorderView extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
// Physical pixel
|
|
||||||
// return Container(
|
|
||||||
// margin: EdgeInsets.only(left: leftPadding),
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// border: Border(
|
|
||||||
// top: BorderSide(color: color, width: height),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue