mirror of https://github.com/Wox-launcher/Wox
Update dependencies and replace ResultTipHeight with ToolbarHeight
Upgraded @wox-launcher/wox-plugin to version 0.0.79. Replaced RESULT_BOTTOM_TIP_BASE_HEIGHT with TOOLBAR_HEIGHT for better clarity and consistency throughout the codebase. Updated relevant method names and usage in accordance with the new constant.
This commit is contained in:
parent
889bfb2020
commit
adfcbc949c
|
@ -6,8 +6,8 @@ settings:
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
'@wox-launcher/wox-plugin':
|
'@wox-launcher/wox-plugin':
|
||||||
specifier: ^0.0.78
|
specifier: ^0.0.79
|
||||||
version: 0.0.78
|
version: 0.0.79
|
||||||
dayjs:
|
dayjs:
|
||||||
specifier: ^1.11.9
|
specifier: ^1.11.9
|
||||||
version: 1.11.9
|
version: 1.11.9
|
||||||
|
@ -1556,8 +1556,8 @@ packages:
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@wox-launcher/wox-plugin@0.0.78:
|
/@wox-launcher/wox-plugin@0.0.79:
|
||||||
resolution: {integrity: sha512-pvF86rCRqc5/fBX15wCofQ7vR0UtvG2WWHjnQ1cmb+MGbmXrmdzmHrRHYgbsqBeze9DMIdGg9wMbfJarf/749Q==}
|
resolution: {integrity: sha512-P7elHcHGBQZgNHKeqPdOfabb0WGWoyalesSxB0AU+IFsGVaSS5k2fCH6FGhELFto/yZeSFxLy8HepI7qGrnQ0w==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/JSONStream@1.3.5:
|
/JSONStream@1.3.5:
|
||||||
|
|
|
@ -32,10 +32,11 @@ class WoxQueryToolbarView extends GetView<WoxLauncherController> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Obx(() {
|
return Obx(() {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: WoxThemeUtil.instance.getResultTipHeight(),
|
height: WoxThemeUtil.instance.getToolbarHeight(),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: fromCssColor(controller.woxTheme.value.toolbarBackgroundColor),
|
color: fromCssColor(controller.woxTheme.value.toolbarBackgroundColor),
|
||||||
|
//add some shadow to the top of the toolbar
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(left: controller.woxTheme.value.toolbarPaddingLeft.toDouble(), right: controller.woxTheme.value.toolbarPaddingRight.toDouble()),
|
padding: EdgeInsets.only(left: controller.woxTheme.value.toolbarPaddingLeft.toDouble(), right: controller.woxTheme.value.toolbarPaddingRight.toDouble()),
|
||||||
|
|
|
@ -579,7 +579,7 @@ class WoxLauncherController extends GetxController {
|
||||||
}
|
}
|
||||||
if (results.isNotEmpty) {
|
if (results.isNotEmpty) {
|
||||||
resultHeight += woxTheme.value.resultContainerPaddingTop + woxTheme.value.resultContainerPaddingBottom;
|
resultHeight += woxTheme.value.resultContainerPaddingTop + woxTheme.value.resultContainerPaddingBottom;
|
||||||
resultHeight += WoxThemeUtil.instance.getResultTipHeight();
|
resultHeight += WoxThemeUtil.instance.getToolbarHeight();
|
||||||
}
|
}
|
||||||
final totalHeight = WoxThemeUtil.instance.getQueryBoxHeight() + resultHeight;
|
final totalHeight = WoxThemeUtil.instance.getQueryBoxHeight() + resultHeight;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const int MAX_LIST_VIEW_ITEM_COUNT = 10;
|
const int MAX_LIST_VIEW_ITEM_COUNT = 10;
|
||||||
const double QUERY_BOX_BASE_HEIGHT = 55.0;
|
const double QUERY_BOX_BASE_HEIGHT = 55.0;
|
||||||
const double RESULT_ITEM_BASE_HEIGHT = 50.0;
|
const double RESULT_ITEM_BASE_HEIGHT = 50.0;
|
||||||
const double RESULT_BOTTOM_TIP_BASE_HEIGHT = 40.0;
|
const double TOOLBAR_HEIGHT = 40.0;
|
||||||
|
|
||||||
const String QUERY_ICON_SELECTION_FILE =
|
const String QUERY_ICON_SELECTION_FILE =
|
||||||
'<svg t="1704957058350" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4383" width="200" height="200"><path d="M127.921872 233.342828H852.118006c24.16765 0 43.960122 19.792472 43.960122 43.960122v522.104578c0 24.16765-19.792472 43.960122-43.960122 43.960122H172.090336c-24.16765 0-43.960122-19.792472-43.960122-43.960122L127.921872 233.342828z" fill="#FFB300" p-id="4384"></path><path d="M156.4647 180.63235h312.721058c15.625636 0 28.334486 13.125534 28.334486 29.376195V233.342828H127.921872v-23.334283c0-16.250661 12.917192-29.376195 28.542828-29.376195z" fill="#FFA000" p-id="4385"></path><path d="M361.889725 258.343845h348.347508v535.855138H312.512716V303.137335z" fill="#FFFFFF" p-id="4386"></path><path d="M170.631943 372.723499h282.719837l59.7941-47.918616H852.118006c23.542625 0 42.710071 19.792472 42.710071 43.960122v430.642523c0 24.16765-19.167447 43.960122-42.710071 43.960122H170.631943c-23.542625 0-42.710071-19.792472-42.710071-43.960122V416.683622c0-24.16765 19.375788-43.960122 42.710071-43.960123z" fill="#FFD54F" p-id="4387"></path><path d="M361.473042 303.76236l-48.960326-0.625025 48.960326-44.79349z" fill="#BDBDBD" p-id="4388"></path></svg>';
|
'<svg t="1704957058350" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4383" width="200" height="200"><path d="M127.921872 233.342828H852.118006c24.16765 0 43.960122 19.792472 43.960122 43.960122v522.104578c0 24.16765-19.792472 43.960122-43.960122 43.960122H172.090336c-24.16765 0-43.960122-19.792472-43.960122-43.960122L127.921872 233.342828z" fill="#FFB300" p-id="4384"></path><path d="M156.4647 180.63235h312.721058c15.625636 0 28.334486 13.125534 28.334486 29.376195V233.342828H127.921872v-23.334283c0-16.250661 12.917192-29.376195 28.542828-29.376195z" fill="#FFA000" p-id="4385"></path><path d="M361.889725 258.343845h348.347508v535.855138H312.512716V303.137335z" fill="#FFFFFF" p-id="4386"></path><path d="M170.631943 372.723499h282.719837l59.7941-47.918616H852.118006c23.542625 0 42.710071 19.792472 42.710071 43.960122v430.642523c0 24.16765-19.167447 43.960122-42.710071 43.960122H170.631943c-23.542625 0-42.710071-19.792472-42.710071-43.960122V416.683622c0-24.16765 19.375788-43.960122 42.710071-43.960123z" fill="#FFD54F" p-id="4387"></path><path d="M361.473042 303.76236l-48.960326-0.625025 48.960326-44.79349z" fill="#BDBDBD" p-id="4388"></path></svg>';
|
||||||
|
|
|
@ -30,8 +30,8 @@ class WoxThemeUtil {
|
||||||
return RESULT_ITEM_BASE_HEIGHT + currentTheme.resultItemPaddingTop + currentTheme.resultItemPaddingBottom;
|
return RESULT_ITEM_BASE_HEIGHT + currentTheme.resultItemPaddingTop + currentTheme.resultItemPaddingBottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getResultTipHeight() {
|
double getToolbarHeight() {
|
||||||
return RESULT_BOTTOM_TIP_BASE_HEIGHT;
|
return TOOLBAR_HEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
double getResultListViewHeightByCount(int count) {
|
double getResultListViewHeightByCount(int count) {
|
||||||
|
|
Loading…
Reference in New Issue