Skip to content

Commit

Permalink
Clean up ToobAmp log messages and rdf:comment's.
Browse files Browse the repository at this point in the history
  • Loading branch information
rerdavies committed Dec 1, 2024
1 parent 4a4bd12 commit b26bce7
Show file tree
Hide file tree
Showing 22 changed files with 618 additions and 382 deletions.
Binary file modified lv2/x86_64/toobamp_1.1.55_amd64.deb
Binary file not shown.
41 changes: 41 additions & 0 deletions react/src/ControlTooltip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

import React, { ReactElement } from 'react';
import Tooltip from "@mui/material/Tooltip"
import { UiControl } from './Lv2Plugin';
import Typography from "@mui/material/Typography";
import Divider from '@mui/material/Divider';


interface ControlTooltipProps {
children: ReactElement,
uiControl: UiControl
}


export default function ControlTooltip(props: ControlTooltipProps) {
let { children, uiControl } = props;
if (uiControl.comment && (uiControl.comment !== uiControl.name)) {
return (
<Tooltip title={(
<React.Fragment>
<Typography variant="caption">{uiControl.name}</Typography>
<Divider />
<Typography variant="caption">{uiControl.comment}</Typography>

</React.Fragment>
)}
placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}
>
{children}
</Tooltip>
);
} else {
return (
<Tooltip title={uiControl.name}
placement="top-start" arrow enterDelay={1500} enterNextDelay={1500}
>
{children}
</Tooltip>
);
}
}
13 changes: 9 additions & 4 deletions react/src/FilePropertyControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import ButtonBase from '@mui/material/ButtonBase'
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
import {PedalboardItem} from './Pedalboard';
import {isDarkMode} from './DarkMode';
import Tooltip from "@mui/material/Tooltip"

export const StandardItemSize = { width: 80, height: 140 }

Expand Down Expand Up @@ -208,10 +209,14 @@ const FilePropertyControl =
<div style={{ display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "flex-start", width: item_width, margin: 8, paddingLeft: 8 }}>
{/* TITLE SECTION */}
<div style={{ flex: "0 0 auto", width: "100%", marginBottom: 8, marginLeft: 0, marginRight: 0 }}>
<Typography variant="caption" display="block" noWrap style={{
width: "100%",
textAlign: "start"
}}> {fileProperty.label}</Typography>
<Tooltip title={fileProperty.label} placement="top-start" arrow
enterDelay={1000} enterNextDelay={1000}
>
<Typography variant="caption" display="block" noWrap style={{
width: "100%",
textAlign: "start"
}}> {fileProperty.label}</Typography>
</Tooltip>
</div>
{/* CONTROL SECTION */}

Expand Down
17 changes: 10 additions & 7 deletions react/src/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ export const MainPage =
this.setSelection(selectedId);
let item = this.getPedalboardItem(selectedId);
if (item != null) {
if (item.isSplit()) {
if (item.isStart() || item.isEnd())
{
// do nothing.
} else if (item.isSplit()) {
let split = item as PedalboardSplitItem;
if (split.getSplitType() === SplitType.Ab) {
let cv = split.getToggleAbControlValue();
Expand Down Expand Up @@ -363,7 +366,7 @@ export const MainPage =
titleBar(pedalboardItem: PedalboardItem | null): React.ReactNode {
let title = "";
let author = "";
let pluginUri = "";
let infoPluginUri = "";
let presetsUri = "";
let missing = false;
if (pedalboardItem) {
Expand All @@ -375,7 +378,7 @@ export const MainPage =
title = pedalboardItem.pluginName ?? "#error";
author = "";
presetsUri = "";
pluginUri = "";
infoPluginUri = "";
}
else {
let uiPlugin = this.model.getUiPlugin(pedalboardItem.uri);
Expand All @@ -386,9 +389,9 @@ export const MainPage =
title = uiPlugin.name;
author = uiPlugin.author_name;
presetsUri = uiPlugin.uri;
if (uiPlugin.description.length > 20) {
pluginUri = uiPlugin.uri;
}
// if (uiPlugin.description.length > 20) {
// }
infoPluginUri = uiPlugin.uri;
}
}
}
Expand Down Expand Up @@ -422,7 +425,7 @@ export const MainPage =
)}
</div>
<div style={{ flex: "0 0 auto", verticalAlign: "center" }}>
<PluginInfoDialog plugin_uri={pluginUri} />
<PluginInfoDialog plugin_uri={infoPluginUri} />
</div>
<div style={{ flex: "0 0 auto" }}>
<PluginPresetSelector pluginUri={presetsUri} instanceId={pedalboardItem?.instanceId ?? 0}
Expand Down
Loading

0 comments on commit b26bce7

Please sign in to comment.