mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 02:15:01 +00:00
Add example of sprite that might be missing
This commit is contained in:
parent
2572227ddc
commit
3b7a830add
2 changed files with 7 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ import * as Selectors from "../../selectors";
|
|||
import ResizeTarget from "../ResizeTarget";
|
||||
import { WindowId } from "../../types";
|
||||
import FocusTarget from "../FocusTarget";
|
||||
import { useActionCreator, useTypedSelector } from "../../hooks";
|
||||
import { useActionCreator, useSprite, useTypedSelector } from "../../hooks";
|
||||
|
||||
interface TextProps {
|
||||
children: string;
|
||||
|
|
@ -54,13 +54,18 @@ export const GenWindow = ({ children, title, windowId, onKeyDown }: Props) => {
|
|||
const windowSize = getWindowSize(windowId);
|
||||
const selected = focusedWindow === windowId;
|
||||
const { width, height } = getWindowPixelSize(windowId);
|
||||
const topStyle = useSprite(
|
||||
selected
|
||||
? { base: "GEN_TOP_CENTER_FILL_SELECTED" }
|
||||
: { base: "GEN_TOP_CENTER_FILL" }
|
||||
);
|
||||
return (
|
||||
<FocusTarget windowId={windowId} onKeyDown={onKeyDown}>
|
||||
<div
|
||||
className={classnames("gen-window", "window", { selected })}
|
||||
style={{ width, height }}
|
||||
>
|
||||
<div className="gen-top draggable">
|
||||
<div className="gen-top draggable" style={topStyle}>
|
||||
<div className="gen-top-left draggable" />
|
||||
<div className="gen-top-left-fill draggable" />
|
||||
<div className="gen-top-left-end draggable" />
|
||||
|
|
|
|||
|
|
@ -279,7 +279,6 @@ export const imageSelectors: Selectors = {
|
|||
"#volume input:active::-webkit-slider-thumb",
|
||||
"#volume input:active::-moz-range-thumb",
|
||||
],
|
||||
GEN_TOP_CENTER_FILL: [".gen-window .gen-top"],
|
||||
GEN_TOP_LEFT: [".gen-window .gen-top-left"],
|
||||
GEN_TOP_LEFT_END: [".gen-window .gen-top-left-end"],
|
||||
GEN_TOP_RIGHT: [".gen-window .gen-top-right"],
|
||||
|
|
@ -289,7 +288,6 @@ export const imageSelectors: Selectors = {
|
|||
".gen-window .gen-top-right-fill",
|
||||
],
|
||||
|
||||
GEN_TOP_CENTER_FILL_SELECTED: [".gen-window.selected .gen-top"],
|
||||
GEN_TOP_LEFT_SELECTED: [".gen-window.selected .gen-top-left"],
|
||||
GEN_TOP_LEFT_END_SELECTED: [".gen-window.selected .gen-top-left-end"],
|
||||
GEN_TOP_RIGHT_SELECTED: [".gen-window.selected .gen-top-right"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue