* Implement matugen - WIP * Added matugen * Add types and cleanup code * Matugen implementation updates and added more options such as scheme and contrast. * Code cleanup and matugen settings renamed for clarity. * Makon maroon a primary matugen color. * Updates to handle variations of matugen colors * Finalizing matugen and wrapping up variations. * Minor styling updates of the settings dialog. * Do a swww dependency check. * Dependency logic update * Switch shouldn't double trigger notifications now when checking dependency. * Logic was inverted * Add matugen to dependency checker. * Fixed dependency checking conditional * Update dependency list in readme and check for matugen before doing matugen operations * Styling fixes * OSD Fix * Remove unused code from wallpaper service. * Color fixes for matugen. * Nix updates for new dependencies * Change default wallpaper to empty. * Added custom notification service for startup, cleaned up code and updated readme.
30 lines
946 B
TypeScript
30 lines
946 B
TypeScript
import { Label } from "./Label";
|
|
import { Inputter } from "./Inputter";
|
|
import icons from "lib/icons";
|
|
import { RowProps } from "lib/types/options";
|
|
|
|
export const Option = <T>(props: RowProps<T>, className: string = '') => {
|
|
const isUnsaved = Variable(false);
|
|
|
|
return Widget.Box({
|
|
class_name: "option-item",
|
|
hexpand: true,
|
|
children: [
|
|
Widget.Box({
|
|
hpack: "start",
|
|
vpack: "center",
|
|
hexpand: true,
|
|
child: Label(props.title, props.subtitle || ""),
|
|
}),
|
|
Inputter(props, className, isUnsaved),
|
|
Widget.Button({
|
|
vpack: "center",
|
|
class_name: "reset-options",
|
|
child: Widget.Icon(icons.ui.refresh),
|
|
on_clicked: () => props.opt.reset(),
|
|
sensitive: props.opt.bind().as(v => v !== props.opt.initial),
|
|
}),
|
|
]
|
|
})
|
|
}
|