Disable tooltip when intereacting.
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
|
|
||||||
Numeric up-down buttons blown in light theme.
|
|
||||||
|
|
||||||
Tooltips on touch ui?
|
Tooltips on touch ui?
|
||||||
|
|
||||||
|
|
||||||
convolution reverb broken.
|
|
||||||
|
|
||||||
|
|
||||||
- pipewire aux in?
|
- pipewire aux in?
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,43 +4,45 @@
|
|||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fossCopyrights {
|
.fossCopyrights {
|
||||||
padding-top: 16px;
|
padding-top: 16px;
|
||||||
padding-bottom: 16px;
|
padding-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fossLicense {
|
.fossLicense {
|
||||||
padding-left: 36px;
|
padding-left: 36px;
|
||||||
border-bottom: 1px #CCC solid
|
border-bottom: 1px #CCC solid
|
||||||
}
|
}
|
||||||
|
|
||||||
div {
|
div {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
background: "red";
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="number"].scrollMod::-webkit-outer-spin-button,
|
|
||||||
input[type="number"].scrollMod::-webkit-inner-spin-button {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
color: #FFF;
|
|
||||||
background: #0001 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAKUlEQVQYlWNgwAT/sYhhKPiPT+F/LJgEsHv37v+EMGkmkuImoh2NoQAANlcun/q4OoYAAAAASUVORK5CYII=) no-repeat center center;
|
|
||||||
filter: invert(100%);
|
|
||||||
width: 1em;
|
|
||||||
padding: 2px;
|
|
||||||
opacity: .6; /* shows Spin Buttons per default (Chrome >= 39) */
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
input[type="number"].scrollMod::-webkit-inner-spin-button:hover,
|
|
||||||
input[type="number"].scrollMod::-webkit-inner-spin-button:active {
|
|
||||||
background: #0003 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAKUlEQVQYlWNgwAT/sYhhKPiPT+F/LJgEsHv37v+EMGkmkuImoh2NoQAANlcun/q4OoYAAAAASUVORK5CYII=) no-repeat center center;
|
|
||||||
opacity: .8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media not all /* seems to be ok in current chrome (prefers-color-scheme: light) */{
|
||||||
|
input[type="number"].scrollMod::-webkit-outer-spin-button,
|
||||||
|
input[type="number"].scrollMod::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
color: #FFF;
|
||||||
|
background: #0001 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAKUlEQVQYlWNgwAT/sYhhKPiPT+F/LJgEsHv37v+EMGkmkuImoh2NoQAANlcun/q4OoYAAAAASUVORK5CYII=) no-repeat center center;
|
||||||
|
filter: invert(100%);
|
||||||
|
width: 1em;
|
||||||
|
padding: 2px;
|
||||||
|
opacity: .6;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="number"].scrollMod::-webkit-inner-spin-button:hover,
|
||||||
|
input[type="number"].scrollMod::-webkit-inner-spin-button:active {
|
||||||
|
background: #0003 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAKUlEQVQYlWNgwAT/sYhhKPiPT+F/LJgEsHv37v+EMGkmkuImoh2NoQAANlcun/q4OoYAAAAASUVORK5CYII=) no-repeat center center;
|
||||||
|
opacity: .8;
|
||||||
|
}
|
||||||
|
}
|
||||||
input[type=number] {
|
input[type=number] {
|
||||||
-moz-appearance: textfield;
|
-moz-appearance: textfield;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import Button, {ButtonProps} from '@mui/material/Button';
|
import Button, {ButtonProps} from '@mui/material/Button';
|
||||||
import Tooltip from "@mui/material/Tooltip";
|
import ToolTipEx from './ToolTipEx';
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
|
|
||||||
@@ -34,19 +34,17 @@ function ButtonEx(props: ButtonExProps) {
|
|||||||
const { tooltip, style, ...extra } = props;
|
const { tooltip, style, ...extra } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={
|
<ToolTipEx title={
|
||||||
(
|
(
|
||||||
<Typography variant="caption">{tooltip || extra['aria-label']}</Typography>
|
<Typography variant="caption">{tooltip}</Typography>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
placement="top-start" arrow
|
|
||||||
enterDelay={1500} enterNextDelay={1500}
|
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
{/* Using span to prevent tooltip from disappearing when button is disabled */}
|
{/* Using span to prevent tooltip from disappearing when button is disabled */}
|
||||||
<Button {...extra} style={style} />
|
<Button {...extra} style={style} />
|
||||||
</span>
|
</span>
|
||||||
</Tooltip>
|
</ToolTipEx>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default ButtonEx;
|
export default ButtonEx;
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Typography } from "@mui/material";
|
import { Typography } from "@mui/material";
|
||||||
import Tooltip from "@mui/material/Tooltip";
|
import ToolTipEx from "./ToolTipEx";
|
||||||
import { ReactElement } from "react";
|
import { ReactElement } from "react";
|
||||||
|
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ export interface ButtonTooltipProps {
|
|||||||
export default function ButtonTooltip(props: ButtonTooltipProps)
|
export default function ButtonTooltip(props: ButtonTooltipProps)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<Tooltip placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}
|
<ToolTipEx
|
||||||
title={
|
title={
|
||||||
(
|
(
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">
|
||||||
@@ -44,6 +44,6 @@ export default function ButtonTooltip(props: ButtonTooltipProps)
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</Tooltip>
|
</ToolTipEx>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
|
|
||||||
import React, { ReactElement } from 'react';
|
import React, { ReactElement } from 'react';
|
||||||
import Tooltip from "@mui/material/Tooltip"
|
|
||||||
import { UiControl } from './Lv2Plugin';
|
import { UiControl } from './Lv2Plugin';
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import Divider from '@mui/material/Divider';
|
import Divider from '@mui/material/Divider';
|
||||||
|
import ToolTipEx from './ToolTipEx'
|
||||||
|
|
||||||
|
|
||||||
interface ControlTooltipProps {
|
interface ControlTooltipProps {
|
||||||
@@ -16,7 +16,7 @@ export default function ControlTooltip(props: ControlTooltipProps) {
|
|||||||
let { children, uiControl } = props;
|
let { children, uiControl } = props;
|
||||||
if (uiControl.comment && (uiControl.comment !== uiControl.name)) {
|
if (uiControl.comment && (uiControl.comment !== uiControl.name)) {
|
||||||
return (
|
return (
|
||||||
<Tooltip title={(
|
<ToolTipEx title={(
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Typography variant="caption">{uiControl.name}</Typography>
|
<Typography variant="caption">{uiControl.name}</Typography>
|
||||||
<Divider />
|
<Divider />
|
||||||
@@ -24,18 +24,16 @@ export default function ControlTooltip(props: ControlTooltipProps) {
|
|||||||
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}
|
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Tooltip>
|
</ToolTipEx>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<Tooltip title={uiControl.name}
|
<ToolTipEx title={uiControl.name}
|
||||||
placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}
|
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Tooltip>
|
</ToolTipEx>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import ButtonBase from '@mui/material/ButtonBase'
|
|||||||
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
||||||
import { PedalboardItem } from './Pedalboard';
|
import { PedalboardItem } from './Pedalboard';
|
||||||
import { isDarkMode } from './DarkMode';
|
import { isDarkMode } from './DarkMode';
|
||||||
import Tooltip from "@mui/material/Tooltip"
|
|
||||||
|
|
||||||
export const StandardItemSize = { width: 80, height: 140 }
|
export const StandardItemSize = { width: 80, height: 140 }
|
||||||
|
|
||||||
@@ -225,14 +225,10 @@ const FilePropertyControl =
|
|||||||
{/* TITLE SECTION */}
|
{/* TITLE SECTION */}
|
||||||
<div className={classes.titleSection}
|
<div className={classes.titleSection}
|
||||||
>
|
>
|
||||||
<Tooltip title={fileProperty.label} placement="top-start" arrow
|
<Typography variant="caption" display="block" noWrap style={{
|
||||||
enterDelay={1000} enterNextDelay={1000}
|
width: "100%",
|
||||||
>
|
textAlign: "start"
|
||||||
<Typography variant="caption" display="block" noWrap style={{
|
}}> {fileProperty.label}</Typography>
|
||||||
width: "100%",
|
|
||||||
textAlign: "start"
|
|
||||||
}}> {fileProperty.label}</Typography>
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
</div>
|
||||||
{/* CONTROL SECTION */}
|
{/* CONTROL SECTION */}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import IconButton, {IconButtonProps} from '@mui/material/IconButton';
|
import IconButton, {IconButtonProps} from '@mui/material/IconButton';
|
||||||
import Tooltip from "@mui/material/Tooltip";
|
import ToolTipEx from './ToolTipEx';
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
interface IconButtonExProps extends IconButtonProps {
|
interface IconButtonExProps extends IconButtonProps {
|
||||||
@@ -34,16 +34,14 @@ function IconButtonEx(props: IconButtonExProps) {
|
|||||||
const { tooltip,style, ...extra } = props;
|
const { tooltip,style, ...extra } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tooltip title={
|
<ToolTipEx title={
|
||||||
(
|
(
|
||||||
<Typography variant="caption">{tooltip || extra['aria-label'] }</Typography>
|
<Typography variant="caption">{tooltip || extra['aria-label'] }</Typography>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
placement="top-start" arrow
|
|
||||||
enterDelay={1500} enterNextDelay={1500}
|
|
||||||
>
|
>
|
||||||
<IconButton {...extra} style={style} />
|
<IconButton {...extra} style={style} />
|
||||||
</Tooltip>
|
</ToolTipEx>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ import WithStyles, {withTheme} from './WithStyles';
|
|||||||
import { withStyles } from "tss-react/mui";
|
import { withStyles } from "tss-react/mui";
|
||||||
import IconButtonEx from './IconButtonEx';
|
import IconButtonEx from './IconButtonEx';
|
||||||
import ButtonEx from './ButtonEx';
|
import ButtonEx from './ButtonEx';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
|
||||||
|
|
||||||
|
import ToolTipEx from './ToolTipEx';
|
||||||
import { PiPedalModel, PiPedalModelFactory } from './PiPedalModel';
|
import { PiPedalModel, PiPedalModelFactory } from './PiPedalModel';
|
||||||
import {
|
import {
|
||||||
Pedalboard, PedalboardItem, PedalboardSplitItem, SplitType
|
Pedalboard, PedalboardItem, PedalboardSplitItem, SplitType
|
||||||
@@ -530,9 +530,10 @@ export const MainPage =
|
|||||||
}} >
|
}} >
|
||||||
<div style={{ flex: "0 0 auto", width: this.state.splitControlBar? undefined: 80 }} >
|
<div style={{ flex: "0 0 auto", width: this.state.splitControlBar? undefined: 80 }} >
|
||||||
<div style={{ display: bypassVisible ? "block" : "none", width: this.state.splitControlBar? undefined: 80 }} >
|
<div style={{ display: bypassVisible ? "block" : "none", width: this.state.splitControlBar? undefined: 80 }} >
|
||||||
<Tooltip title="Bypass" placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}>
|
<ToolTipEx title="Bypass"
|
||||||
|
>
|
||||||
<Switch color="secondary" checked={bypassChecked} onChange={this.handleEnableCurrentItemChanged} />
|
<Switch color="secondary" checked={bypassChecked} onChange={this.handleEnableCurrentItemChanged} />
|
||||||
</Tooltip>
|
</ToolTipEx>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import { withStyles } from "tss-react/mui";
|
|||||||
import { PiPedalModel, PiPedalModelFactory } from './PiPedalModel';
|
import { PiPedalModel, PiPedalModelFactory } from './PiPedalModel';
|
||||||
import { pluginControlStyles } from './PluginControl';
|
import { pluginControlStyles } from './PluginControl';
|
||||||
import MidiChannelBinding from './MidiChannelBinding';
|
import MidiChannelBinding from './MidiChannelBinding';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import ToolTipEx from './ToolTipEx';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import Divider from '@mui/material/Divider';
|
import Divider from '@mui/material/Divider';
|
||||||
import ButtonBase from '@mui/material/ButtonBase';
|
import ButtonBase from '@mui/material/ButtonBase';
|
||||||
@@ -78,7 +78,7 @@ const MidiChannelBindingControl =
|
|||||||
alignSelf: "stretch"
|
alignSelf: "stretch"
|
||||||
|
|
||||||
}}>
|
}}>
|
||||||
<Tooltip title={(
|
<ToolTipEx title={(
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Typography variant="caption">title</Typography>
|
<Typography variant="caption">title</Typography>
|
||||||
<Divider />
|
<Divider />
|
||||||
@@ -86,13 +86,13 @@ const MidiChannelBindingControl =
|
|||||||
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)}
|
)}
|
||||||
placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}
|
|
||||||
>
|
>
|
||||||
<Typography variant="caption" display="block" noWrap style={{
|
<Typography variant="caption" display="block" noWrap style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
textAlign: "center"
|
textAlign: "center"
|
||||||
}}> MIDI</Typography>
|
}}> MIDI</Typography>
|
||||||
</Tooltip>
|
</ToolTipEx>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{/* CONTROL SECTION */}
|
{/* CONTROL SECTION */}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ import JsonAtom from './JsonAtom';
|
|||||||
import PluginOutputControl from './PluginOutputControl';
|
import PluginOutputControl from './PluginOutputControl';
|
||||||
import Units from './Units';
|
import Units from './Units';
|
||||||
import ToobFrequencyResponseView from './ToobFrequencyResponseView';
|
import ToobFrequencyResponseView from './ToobFrequencyResponseView';
|
||||||
import Tooltip from '@mui/material/Tooltip';
|
import ToolTipEx from './ToolTipEx';
|
||||||
import MidiChannelBindingControl from './MidiChannelBindingControl';
|
import MidiChannelBindingControl from './MidiChannelBindingControl';
|
||||||
import MidiChannelBinding from './MidiChannelBinding';
|
import MidiChannelBinding from './MidiChannelBinding';
|
||||||
|
|
||||||
@@ -697,11 +697,10 @@ const PluginControlView =
|
|||||||
result.push((
|
result.push((
|
||||||
<div key={"ctlx" + (this.controlKeyIndex++)} className={!isLandscapeGrid ? classes.portGroup : classes.portGroupLandscape}>
|
<div key={"ctlx" + (this.controlKeyIndex++)} className={!isLandscapeGrid ? classes.portGroup : classes.portGroupLandscape}>
|
||||||
<div className={classes.portGroupTitle}>
|
<div className={classes.portGroupTitle}>
|
||||||
<Tooltip title={controlGroup.name}
|
<ToolTipEx title={controlGroup.name}
|
||||||
placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}
|
|
||||||
>
|
>
|
||||||
<Typography noWrap variant="caption" >{controlGroup.name}</Typography>
|
<Typography noWrap variant="caption" >{controlGroup.name}</Typography>
|
||||||
</Tooltip>
|
</ToolTipEx>
|
||||||
</div>
|
</div>
|
||||||
<div className={
|
<div className={
|
||||||
this.state.landscapeGrid ? classes.portGroupControlsLandscape : classes.portGroupControls} >
|
this.state.landscapeGrid ? classes.portGroupControlsLandscape : classes.portGroupControls} >
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2025 Robin E. R. Davies
|
||||||
|
* All rights reserved.
|
||||||
|
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import Tooltip from '@mui/material/Tooltip';
|
||||||
|
|
||||||
|
export interface ToolTipExProps extends React.ComponentProps<typeof Tooltip> {
|
||||||
|
}
|
||||||
|
|
||||||
|
function ToolTipEx(props: ToolTipExProps) {
|
||||||
|
let [disableToolTip, setDisableToolTip] = React.useState(false);
|
||||||
|
let {title, ...extras} = props;
|
||||||
|
function handleMouseDownCapture(event: React.PointerEvent<HTMLDivElement>) {
|
||||||
|
if ((event as any).pointerType === "mouse") {
|
||||||
|
setDisableToolTip(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePointerMoveCapture(event: React.PointerEvent<HTMLDivElement>) {
|
||||||
|
if ((event as any).pointerType !== "mouse") {
|
||||||
|
setDisableToolTip(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
onPointerDownCapture={(e) => {
|
||||||
|
handleMouseDownCapture(e);
|
||||||
|
}}
|
||||||
|
onPointerMoveCapture={(e) => {
|
||||||
|
handlePointerMoveCapture(e);
|
||||||
|
}}
|
||||||
|
onMouseLeave={() => {
|
||||||
|
setDisableToolTip(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Tooltip {...extras}
|
||||||
|
title={disableToolTip? undefined: title}
|
||||||
|
placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}
|
||||||
|
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ToolTipEx;
|
||||||
Reference in New Issue
Block a user