1.1.30 Dark mode for android app.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
cmake_minimum_required(VERSION 3.16.0)
|
cmake_minimum_required(VERSION 3.16.0)
|
||||||
project(pipedal
|
project(pipedal
|
||||||
VERSION 1.1.29
|
VERSION 1.1.30
|
||||||
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
|
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
|
||||||
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
|
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
|
||||||
)
|
)
|
||||||
|
|||||||
Vendored
+1
-1
@@ -9,6 +9,6 @@ Package: pipedal
|
|||||||
Pre-Depends: hostapd;authbind;dnsmasq
|
Pre-Depends: hostapd;authbind;dnsmasq
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: sound
|
Section: sound
|
||||||
Version: 1.1.29
|
Version: 1.1.30
|
||||||
Installed-Size: 15147
|
Installed-Size: 15147
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
# Release Notes
|
# Release Notes
|
||||||
|
## PiPedal 1.1.30
|
||||||
|
|
||||||
|
- Use system preferences for dark mode when connecting from Android app.
|
||||||
|
-
|
||||||
|
|
||||||
## PiPedal 1.1.28
|
## PiPedal 1.1.28
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
To download PiPedal, click [here](download.md).
|
To download PiPedal, click [here](download.md).
|
||||||
|
|
||||||
> NEW version 1.1.29 release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
|
> NEW version 1.1.30 release. See the [release notes](https://rerdavies.github.io/pipedal/ReleaseNotes) for details.
|
||||||
|
|
||||||
|
|
||||||
Use your Raspberry Pi as a guitar effects pedal. Configure and control PiPedal with your phone or tablet.
|
Use your Raspberry Pi as a guitar effects pedal. Configure and control PiPedal with your phone or tablet.
|
||||||
|
|||||||
+2
-1
@@ -58,6 +58,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
||||||
"@types/react-window": "^1.8.5"
|
"@types/react-window": "^1.8.5",
|
||||||
|
"@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+46
-15
@@ -40,22 +40,52 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
const darkMode = localStorage.getItem("darkMode"); if (darkMode) { }
|
const androidHosted = !!(window.AndroidHost);
|
||||||
if (darkMode)
|
|
||||||
{
|
var darkMode = false;
|
||||||
let bgStyle = document.getElementById("bgStyle");
|
var useSystem = false;
|
||||||
if (bgStyle)
|
|
||||||
{
|
var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||||
// disable the style block.
|
|
||||||
bgStyle.setAttribute('media',"max-width: 1px");
|
switch (localStorage.getItem("colorScheme")) {
|
||||||
}
|
case null:
|
||||||
|
default:
|
||||||
|
if (androidHosted) {
|
||||||
|
useSystem = true;
|
||||||
|
} else {
|
||||||
|
darkMode = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "Light":
|
||||||
|
darkMode = false;
|
||||||
|
break;
|
||||||
|
case "Dark":
|
||||||
|
darkMode = true;
|
||||||
|
break;
|
||||||
|
case "System":
|
||||||
|
useSystem = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (useSystem)
|
||||||
|
{
|
||||||
|
darkMode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!darkMode) {
|
||||||
|
let bgStyle = document.getElementById("bgStyle");
|
||||||
|
if (bgStyle) {
|
||||||
|
// disable the style block.
|
||||||
|
bgStyle.setAttribute('media', "max-width: 1px");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body >
|
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<body>
|
||||||
<div id="root"></div>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<!--
|
<div id="root"></div>
|
||||||
|
<!--
|
||||||
This HTML file is a template.
|
This HTML file is a template.
|
||||||
If you open it directly in the browser, you will see an empty page.
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
@@ -65,5 +95,6 @@
|
|||||||
To begin the development, run `npm start` or `yarn start`.
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
-->
|
-->
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
+1
-1
@@ -21,7 +21,7 @@ import React from 'react';
|
|||||||
import { ThemeProvider, createTheme, StyledEngineProvider, Theme } from '@mui/material/styles';
|
import { ThemeProvider, createTheme, StyledEngineProvider, Theme } from '@mui/material/styles';
|
||||||
|
|
||||||
import AppThemed from "./AppThemed";
|
import AppThemed from "./AppThemed";
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
declare module '@mui/material/styles' {
|
declare module '@mui/material/styles' {
|
||||||
interface Theme {
|
interface Theme {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ import { BankIndex, BankIndexEntry } from './Banks';
|
|||||||
import RenameDialog from './RenameDialog';
|
import RenameDialog from './RenameDialog';
|
||||||
import JackStatusView from './JackStatusView';
|
import JackStatusView from './JackStatusView';
|
||||||
import { Theme } from '@mui/material/styles';
|
import { Theme } from '@mui/material/styles';
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
import {ReactComponent as RenameOutlineIcon} from './svg/drive_file_rename_outline_black_24dp.svg';
|
import {ReactComponent as RenameOutlineIcon} from './svg/drive_file_rename_outline_black_24dp.svg';
|
||||||
import {ReactComponent as SaveBankAsIcon} from './svg/ic_save_bank_as.svg';
|
import {ReactComponent as SaveBankAsIcon} from './svg/ic_save_bank_as.svg';
|
||||||
|
|||||||
+51
-5
@@ -17,12 +17,58 @@
|
|||||||
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
// 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.
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
export enum ColorTheme {
|
||||||
|
Light,
|
||||||
|
Dark,
|
||||||
|
System
|
||||||
|
};
|
||||||
|
|
||||||
export default function isDarkMode(): boolean {
|
|
||||||
let value = localStorage.getItem("darkMode");
|
|
||||||
return value === "true";
|
export function getColorScheme(): ColorTheme {
|
||||||
|
const androidHosted = !!((window as any).AndroidHost);
|
||||||
|
|
||||||
|
switch (localStorage.getItem('colorScheme')) {
|
||||||
|
case null:
|
||||||
|
default:
|
||||||
|
if (androidHosted) {
|
||||||
|
return ColorTheme.System;
|
||||||
|
} else {
|
||||||
|
return ColorTheme.Light;
|
||||||
|
}
|
||||||
|
case "Light":
|
||||||
|
return ColorTheme.Light;
|
||||||
|
case "Dark":
|
||||||
|
return ColorTheme.Dark;
|
||||||
|
case "System":
|
||||||
|
return ColorTheme.System;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export function setColorScheme(value: ColorTheme): void {
|
||||||
|
var storageValue;
|
||||||
|
switch (value) {
|
||||||
|
default:
|
||||||
|
case ColorTheme.Light:
|
||||||
|
storageValue = "Light";
|
||||||
|
break;
|
||||||
|
case ColorTheme.Dark:
|
||||||
|
storageValue = "Dark";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ColorTheme.System:
|
||||||
|
storageValue = "System";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
localStorage.setItem("colorScheme", storageValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setDarkMode(value: boolean): void {
|
export function isDarkMode(): boolean {
|
||||||
localStorage.setItem("darkMode",value? "true": "false");
|
var colorTheme = getColorScheme();
|
||||||
|
if (colorTheme === ColorTheme.System) {
|
||||||
|
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return colorTheme === ColorTheme.Dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { Theme } from '@mui/material/styles';
|
|||||||
import createStyles from '@mui/styles/createStyles';
|
import createStyles from '@mui/styles/createStyles';
|
||||||
import { Property } from "csstype";
|
import { Property } from "csstype";
|
||||||
import { nullCast} from './Utility'
|
import { nullCast} from './Utility'
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
const SELECT_SCALE = 1.0;
|
const SELECT_SCALE = 1.0;
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ import { PiPedalModel, PiPedalModelFactory, ListenHandle} from './PiPedalModel';
|
|||||||
import ButtonBase from '@mui/material/ButtonBase'
|
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';
|
||||||
|
|
||||||
|
|
||||||
export const StandardItemSize = { width: 80, height: 140 }
|
export const StandardItemSize = { width: 80, height: 140 }
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ import createStyles from '@mui/styles/createStyles';
|
|||||||
import withStyles from '@mui/styles/withStyles';
|
import withStyles from '@mui/styles/withStyles';
|
||||||
import { MonitorPortHandle, PiPedalModel, State, PiPedalModelFactory } from "./PiPedalModel";
|
import { MonitorPortHandle, PiPedalModel, State, PiPedalModelFactory } from "./PiPedalModel";
|
||||||
import SvgPathBuilder from './SvgPathBuilder'
|
import SvgPathBuilder from './SvgPathBuilder'
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
//const char* model[] = {"12-TET","19-TET","24-TET", "31-TET", "53-TET"};
|
//const char* model[] = {"12-TET","19-TET","24-TET", "31-TET", "53-TET"};
|
||||||
// set_adjustment(ui->widget[2]->adj,440.0, 440.0, 427.0, 453.0, 0.1, CL_CONTINUOS);
|
// set_adjustment(ui->widget[2]->adj,440.0, 440.0, 427.0, 453.0, 0.1, CL_CONTINUOS);
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,7 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
|
|
||||||
const RED_COLOR = isDarkMode()? "#F88":"#C00";
|
const RED_COLOR = isDarkMode()? "#F88":"#C00";
|
||||||
const GREEN_COLOR = isDarkMode()? "rgba(255,255,255,0.7)": "#666";
|
const GREEN_COLOR = isDarkMode()? "rgba(255,255,255,0.7)": "#666";
|
||||||
|
|||||||
@@ -47,8 +47,7 @@ import MidiBindingsDialog from './MidiBindingsDialog';
|
|||||||
import PluginPresetSelector from './PluginPresetSelector';
|
import PluginPresetSelector from './PluginPresetSelector';
|
||||||
import {ReactComponent as OldDeleteIcon} from "./svg/old_delete_outline_24dp.svg";
|
import {ReactComponent as OldDeleteIcon} from "./svg/old_delete_outline_24dp.svg";
|
||||||
import {ReactComponent as MidiIcon} from "./svg/ic_midi.svg";
|
import {ReactComponent as MidiIcon} from "./svg/ic_midi.svg";
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
|
|
||||||
const SPLIT_CONTROLBAR_THRESHHOLD = 650;
|
const SPLIT_CONTROLBAR_THRESHHOLD = 650;
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,7 @@ import Draggable from './Draggable'
|
|||||||
import Rect from './Rect';
|
import Rect from './Rect';
|
||||||
import {PiPedalStateError} from './PiPedalError';
|
import {PiPedalStateError} from './PiPedalError';
|
||||||
import Utility from './Utility';
|
import Utility from './Utility';
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Pedalboard, PedalboardItem, PedalboardSplitItem, SplitType
|
Pedalboard, PedalboardItem, PedalboardSplitItem, SplitType
|
||||||
} from './Pedalboard';
|
} from './Pedalboard';
|
||||||
|
|||||||
@@ -38,12 +38,8 @@ import GovernorSettings from './GovernorSettings';
|
|||||||
import WifiChannel from './WifiChannel';
|
import WifiChannel from './WifiChannel';
|
||||||
import AlsaDeviceInfo from './AlsaDeviceInfo';
|
import AlsaDeviceInfo from './AlsaDeviceInfo';
|
||||||
import { AndroidHostInterface, FakeAndroidHost } from './AndroidHost';
|
import { AndroidHostInterface, FakeAndroidHost } from './AndroidHost';
|
||||||
import isDarkMode, {setDarkMode} from './DarkMode';
|
import {ColorTheme, getColorScheme,setColorScheme} from './DarkMode';
|
||||||
|
|
||||||
export enum ColorTheme {
|
|
||||||
Light,
|
|
||||||
Dark
|
|
||||||
};
|
|
||||||
|
|
||||||
export enum State {
|
export enum State {
|
||||||
Loading,
|
Loading,
|
||||||
@@ -2546,13 +2542,14 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
getTheme(): ColorTheme {
|
getTheme(): ColorTheme {
|
||||||
return isDarkMode() ? ColorTheme.Dark: ColorTheme.Light;
|
return getColorScheme();
|
||||||
}
|
}
|
||||||
|
|
||||||
setTheme(value: ColorTheme) {
|
setTheme(value: ColorTheme) {
|
||||||
|
|
||||||
if (this.getTheme() !== value)
|
if (this.getTheme() !== value)
|
||||||
{
|
{
|
||||||
setDarkMode(value === ColorTheme.Dark);
|
setColorScheme(value);
|
||||||
this.reloadPage();
|
this.reloadPage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2562,7 +2559,7 @@ export class PiPedalModel //implements PiPedalModel
|
|||||||
reloadPage() {
|
reloadPage() {
|
||||||
this.reloadRequested = true;
|
this.reloadRequested = true;
|
||||||
// eslint-disable-next-line no-restricted-globals
|
// eslint-disable-next-line no-restricted-globals
|
||||||
location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,7 @@ import withStyles from '@mui/styles/withStyles';
|
|||||||
import { UiControl } from './Lv2Plugin';
|
import { UiControl } from './Lv2Plugin';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { PiPedalModel, PiPedalModelFactory, MonitorPortHandle,State } from './PiPedalModel';
|
import { PiPedalModel, PiPedalModelFactory, MonitorPortHandle,State } from './PiPedalModel';
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
import React, { SyntheticEvent,Component } from 'react';
|
import React, { SyntheticEvent,Component } from 'react';
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { PiPedalModel, PiPedalModelFactory, PresetIndexEntry, PresetIndex } from './PiPedalModel';
|
import { PiPedalModel, PiPedalModelFactory, PresetIndexEntry, PresetIndex } from './PiPedalModel';
|
||||||
|
|||||||
@@ -34,8 +34,7 @@ import Divider from '@mui/material/Divider';
|
|||||||
import RenameDialog from './RenameDialog'
|
import RenameDialog from './RenameDialog'
|
||||||
import Select from '@mui/material/Select';
|
import Select from '@mui/material/Select';
|
||||||
import UploadPresetDialog from './UploadPresetDialog';
|
import UploadPresetDialog from './UploadPresetDialog';
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
|
|
||||||
interface PresetSelectorProps extends WithStyles<typeof styles> {
|
interface PresetSelectorProps extends WithStyles<typeof styles> {
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import FormControl from '@mui/material/FormControl';
|
|||||||
|
|
||||||
import RadioGroup from '@mui/material/RadioGroup';
|
import RadioGroup from '@mui/material/RadioGroup';
|
||||||
import Radio from '@mui/material/Radio';
|
import Radio from '@mui/material/Radio';
|
||||||
import {ColorTheme} from './PiPedalModel';
|
import {ColorTheme} from './DarkMode';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -45,7 +45,14 @@ function SelectThemesDialog(props: SelectThemesDialogProps) {
|
|||||||
const { onClose, defaultTheme, open,onOk } = props;
|
const { onClose, defaultTheme, open,onOk } = props;
|
||||||
const [ selectedTheme, setSelectedTheme ] = useState(defaultTheme);
|
const [ selectedTheme, setSelectedTheme ] = useState(defaultTheme);
|
||||||
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
let value = ((event.target as HTMLInputElement).value) === '0' ? ColorTheme.Light: ColorTheme.Dark;
|
let value = ColorTheme.Light;
|
||||||
|
if ((event.target as HTMLInputElement).value === '1')
|
||||||
|
{
|
||||||
|
value = ColorTheme.Dark;
|
||||||
|
} else if ((event.target as HTMLInputElement).value === '2')
|
||||||
|
{
|
||||||
|
value = ColorTheme.System;
|
||||||
|
}
|
||||||
setSelectedTheme(value);
|
setSelectedTheme(value);
|
||||||
};
|
};
|
||||||
const handleClose = (): void => {
|
const handleClose = (): void => {
|
||||||
@@ -67,6 +74,7 @@ function SelectThemesDialog(props: SelectThemesDialogProps) {
|
|||||||
>
|
>
|
||||||
<FormControlLabel value={ColorTheme.Light} control={<Radio size='small' />} label="Light" />
|
<FormControlLabel value={ColorTheme.Light} control={<Radio size='small' />} label="Light" />
|
||||||
<FormControlLabel value={ColorTheme.Dark} control={<Radio size='small' />} label="Dark" />
|
<FormControlLabel value={ColorTheme.Dark} control={<Radio size='small' />} label="Dark" />
|
||||||
|
<FormControlLabel value={ColorTheme.System} control={<Radio size='small' />} label="Use system setting" />
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ import OkCancelDialog from './OkCancelDialog';
|
|||||||
import ListSelectDialog from './ListSelectDialog';
|
import ListSelectDialog from './ListSelectDialog';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { PiPedalModel, PiPedalModelFactory, State, ColorTheme } from './PiPedalModel';
|
import { PiPedalModel, PiPedalModelFactory, State } from './PiPedalModel';
|
||||||
|
import {ColorTheme} from './DarkMode';
|
||||||
import ButtonBase from "@mui/material/ButtonBase";
|
import ButtonBase from "@mui/material/ButtonBase";
|
||||||
import AppBar from '@mui/material/AppBar';
|
import AppBar from '@mui/material/AppBar';
|
||||||
import Button from '@mui/material/Button';
|
import Button from '@mui/material/Button';
|
||||||
@@ -749,7 +750,8 @@ const SettingsDialog = withStyles(styles, { withTheme: true })(
|
|||||||
<Typography className={classes.primaryItem} display="block" variant="body2" color="textPrimary" noWrap>
|
<Typography className={classes.primaryItem} display="block" variant="body2" color="textPrimary" noWrap>
|
||||||
Color Theme</Typography>
|
Color Theme</Typography>
|
||||||
<Typography className={classes.secondaryItem} display="block" variant="caption" color="textSecondary" noWrap>
|
<Typography className={classes.secondaryItem} display="block" variant="caption" color="textSecondary" noWrap>
|
||||||
{ this.model.getTheme() === ColorTheme.Dark ? "Dark" :"Light"}
|
{ this.model.getTheme() === ColorTheme.Dark ? "Dark" :
|
||||||
|
(this.model.getTheme() === ColorTheme.Light ? "Light": "System")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ import IconButton from '@mui/material/Toolbar';
|
|||||||
import Drawer from '@mui/material/Drawer';
|
import Drawer from '@mui/material/Drawer';
|
||||||
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
||||||
import { Theme } from '@mui/material/styles';
|
import { Theme } from '@mui/material/styles';
|
||||||
import isDarkMode from './DarkMode';
|
import {isDarkMode} from './DarkMode';
|
||||||
|
|
||||||
|
|
||||||
const drawerStyles = (theme: Theme) => {
|
const drawerStyles = (theme: Theme) => {
|
||||||
return createStyles({
|
return createStyles({
|
||||||
|
|||||||
+5
-5
@@ -107,7 +107,7 @@ namespace pipedal {
|
|||||||
class UiFileProperty {
|
class UiFileProperty {
|
||||||
private:
|
private:
|
||||||
std::string label_;
|
std::string label_;
|
||||||
std::int64_t index_ = -1;
|
std::int32_t index_ = -1;
|
||||||
std::string directory_;
|
std::string directory_;
|
||||||
std::vector<UiFileType> fileTypes_;
|
std::vector<UiFileType> fileTypes_;
|
||||||
std::string patchProperty_;
|
std::string patchProperty_;
|
||||||
@@ -120,7 +120,7 @@ namespace pipedal {
|
|||||||
|
|
||||||
|
|
||||||
const std::string &label() const { return label_; }
|
const std::string &label() const { return label_; }
|
||||||
int64_t index() const { return index_; }
|
int32_t index() const { return index_; }
|
||||||
const std::string &directory() const { return directory_; }
|
const std::string &directory() const { return directory_; }
|
||||||
const std::string&portGroup() const { return portGroup_; }
|
const std::string&portGroup() const { return portGroup_; }
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ namespace pipedal {
|
|||||||
class UiFrequencyPlot {
|
class UiFrequencyPlot {
|
||||||
private:
|
private:
|
||||||
std::string patchProperty_;
|
std::string patchProperty_;
|
||||||
std::int64_t index_ = -1;
|
std::int32_t index_ = -1;
|
||||||
std::string portGroup_;
|
std::string portGroup_;
|
||||||
float xLeft_ = 100;
|
float xLeft_ = 100;
|
||||||
float xRight_ = 22000;
|
float xRight_ = 22000;
|
||||||
@@ -152,11 +152,11 @@ namespace pipedal {
|
|||||||
const std::filesystem::path&resourcePath);
|
const std::filesystem::path&resourcePath);
|
||||||
|
|
||||||
const std::string &patchProperty() const { return patchProperty_; }
|
const std::string &patchProperty() const { return patchProperty_; }
|
||||||
int64_t index() const { return index_; }
|
int32_t index() const { return index_; }
|
||||||
const std::string&portGroup() const { return portGroup_; }
|
const std::string&portGroup() const { return portGroup_; }
|
||||||
float xLeft() const { return xLeft_; }
|
float xLeft() const { return xLeft_; }
|
||||||
float xRight() const { return xRight_; }
|
float xRight() const { return xRight_; }
|
||||||
float xLog() const { return xLog_; }
|
bool xLog() const { return xLog_; }
|
||||||
float yTop() const { return yTop_; }
|
float yTop() const { return yTop_; }
|
||||||
float yBottom() const { return yBottom_; }
|
float yBottom() const { return yBottom_; }
|
||||||
float width() const { return width_; }
|
float width() const { return width_; }
|
||||||
|
|||||||
+2
-1
@@ -105,6 +105,7 @@ void PluginHost::SetConfiguration(const PiPedalConfiguration &configuration)
|
|||||||
|
|
||||||
void PluginHost::LilvUris::Initialize(LilvWorld *pWorld)
|
void PluginHost::LilvUris::Initialize(LilvWorld *pWorld)
|
||||||
{
|
{
|
||||||
|
isA = lilv_new_uri(pWorld, "http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
|
||||||
rdfs__Comment = lilv_new_uri(pWorld, PluginHost::RDFS__comment);
|
rdfs__Comment = lilv_new_uri(pWorld, PluginHost::RDFS__comment);
|
||||||
rdfs__range = lilv_new_uri(pWorld, PluginHost::RDFS__range);
|
rdfs__range = lilv_new_uri(pWorld, PluginHost::RDFS__range);
|
||||||
port_logarithmic = lilv_new_uri(pWorld, LV2_PORT_PROPS__logarithmic);
|
port_logarithmic = lilv_new_uri(pWorld, LV2_PORT_PROPS__logarithmic);
|
||||||
@@ -591,7 +592,7 @@ std::shared_ptr<PiPedalUI> Lv2PluginInfo::FindWritablePathProperties(PluginHost
|
|||||||
AutoLilvNode propertyUri = lilv_nodes_get(patchWritables, iNode);
|
AutoLilvNode propertyUri = lilv_nodes_get(patchWritables, iNode);
|
||||||
if (propertyUri)
|
if (propertyUri)
|
||||||
{
|
{
|
||||||
// isA lv2:Parameter?
|
// a lv2:Parameter?
|
||||||
if (lilv_world_ask(pWorld, propertyUri, lv2Host->lilvUris.isA, lv2Host->lilvUris.lv2core__Parameter))
|
if (lilv_world_ask(pWorld, propertyUri, lv2Host->lilvUris.isA, lv2Host->lilvUris.lv2core__Parameter))
|
||||||
{
|
{
|
||||||
// rfs:range atom:Path?
|
// rfs:range atom:Path?
|
||||||
|
|||||||
@@ -634,6 +634,7 @@ void json_reader::throw_format_error(const char*error)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// void json_writer::write(const json_variant &value)
|
// void json_writer::write(const json_variant &value)
|
||||||
// {
|
// {
|
||||||
// ((JsonSerializable *)&value)->write_json(*this);
|
// ((JsonSerializable *)&value)->write_json(*this);
|
||||||
|
|||||||
+2
-4
@@ -700,12 +700,9 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
// wait up to 15 seconds for the midi device to come online.
|
// wait up to 15 seconds for the midi device to come online.
|
||||||
auto devices = model.GetAlsaDevices();
|
auto devices = model.GetAlsaDevices();
|
||||||
bool firstMessage = true;
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
if (!HasAlsaDevice(devices, serverSettings.GetAlsaInputDevice()))
|
if (!HasAlsaDevice(devices, serverSettings.GetAlsaInputDevice()))
|
||||||
{
|
{
|
||||||
if (firstMessage) Lv2Log::info(SS("Waiting for ALSA device " << serverSettings.GetAlsaInputDevice() << " to come online..."));
|
|
||||||
firstMessage = false;
|
|
||||||
for (int i = 0; i < 5; ++i)
|
for (int i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
sleep(3);
|
sleep(3);
|
||||||
@@ -717,10 +714,11 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
if (g_SigBreak)
|
if (g_SigBreak)
|
||||||
exit(1);
|
exit(1);
|
||||||
if (systemd)
|
if (!systemd)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Lv2Log::info(SS("Waiting for ALSA device " << serverSettings.GetAlsaInputDevice() << " to come online..."));
|
||||||
}
|
}
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user