Refactored hooks to specify events and reworked the dropdowns to be significantly faster and more responsive. (#304)
* Updated events to be more specific * Update more events * Update globalmousepos * Update themes and submap module to show submap name. * Type fixes * Reworked menu position calculation logic to be much more efficient. * Revert import file location * We luv arrow functions * Remove globalMousePos remnants since it's unused. * Added the ability to configure menu dropdown transition and duration. * Fix type
This commit is contained in:
3
lib/types/dropdownmenu.d.ts
vendored
3
lib/types/dropdownmenu.d.ts
vendored
@@ -1,11 +1,12 @@
|
||||
import { WindowProps } from 'types/widgets/window';
|
||||
import { GtkWidget, Transition } from './widget';
|
||||
import { Binding } from 'types/service';
|
||||
|
||||
export type DropdownMenuProps = {
|
||||
name: string;
|
||||
child: GtkWidget;
|
||||
layout?: string;
|
||||
transition?: Transition;
|
||||
transition?: Transition | Binding<Transition>;
|
||||
exclusivity?: Exclusivity;
|
||||
fixed?: boolean;
|
||||
} & WindowProps;
|
||||
|
||||
4
lib/types/globals.d.ts
vendored
Normal file
4
lib/types/globals.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export type MousePos = {
|
||||
source: string;
|
||||
pos: number[];
|
||||
};
|
||||
6
lib/types/options.d.ts
vendored
6
lib/types/options.d.ts
vendored
@@ -2,7 +2,7 @@ import { Opt } from 'lib/option';
|
||||
import { Variable } from 'types/variable';
|
||||
import { defaultColorMap } from './defaults/options';
|
||||
|
||||
export type MkOptionsResult<T> = {
|
||||
export type MkOptionsResult = {
|
||||
configFile: string;
|
||||
array: () => Opt[];
|
||||
reset: () => Promise<string>;
|
||||
@@ -11,7 +11,7 @@ export type MkOptionsResult<T> = {
|
||||
};
|
||||
|
||||
export type RecursiveOptionsObject = {
|
||||
[key: string]: RecursiveOptionsObject | Opt<string | number | boolean> | Opt<any>;
|
||||
[key: string]: RecursiveOptionsObject | Opt<string> | Opt<number> | Opt<boolean>;
|
||||
};
|
||||
|
||||
export type BarLocation = 'top' | 'bottom';
|
||||
@@ -57,7 +57,7 @@ export type RowProps<T> = {
|
||||
min?: number;
|
||||
disabledBinding?: Variable<boolean>;
|
||||
exportData?: ThemeExportData;
|
||||
subtitle?: string | VarType<any> | Opt;
|
||||
subtitle?: string | VarType<string> | Opt;
|
||||
subtitleLink?: string;
|
||||
dependencies?: string[];
|
||||
increment?: number;
|
||||
|
||||
4
lib/types/popupwindow.d.ts
vendored
4
lib/types/popupwindow.d.ts
vendored
@@ -4,9 +4,9 @@ import { Transition } from './widget';
|
||||
|
||||
export type PopupWindowProps = {
|
||||
name: string;
|
||||
child: any;
|
||||
child: Widget;
|
||||
layout?: Layouts;
|
||||
transition?: any;
|
||||
transition?: Transition | Binding<Transition>;
|
||||
exclusivity?: Exclusivity;
|
||||
} & WindowProps;
|
||||
|
||||
|
||||
1
lib/types/powerprofiles.d.ts
vendored
1
lib/types/powerprofiles.d.ts
vendored
@@ -1,4 +1,3 @@
|
||||
import icons from 'modules/icons/index';
|
||||
import PowerProfiles from 'types/service/powerprofiles.js';
|
||||
|
||||
export type PowerProfiles = InstanceType<typeof PowerProfiles>;
|
||||
|
||||
Reference in New Issue
Block a user