fix(zoom): inital commit on possbile fix

This commit is contained in:
Christopher authored and Taso committed 2021-02-06 13:29:02 -05:00
1 parent 7e9c1d0f35
commit 5da2d680c6
5 files changed
+22 -19

No files matched your search

+5
View File
@@ -58,3 +58,8 @@
*::-webkit-scrollbar-thumb { *::-webkit-scrollbar-thumb {
background-color: #666; background-color: #666;
} }
.zoomProp {
transform: scale(10);
}
+2 -2
View File
@@ -323,8 +323,8 @@ function Phone() {
return ( return (
<ThemeProvider theme={currentTheme()}> <ThemeProvider theme={currentTheme()}>
<div className='PhoneWrapper'> <div className='PhoneWrapper' style={{ transform: `scale(${settings.zoom})` }}>
<div style={{ zoom: settings.zoom }}> <div>
<div className='Phone'> <div className='Phone'>
<div <div
className='PhoneFrame' className='PhoneFrame'
@@ -9,7 +9,7 @@ import {
interface IProps { interface IProps {
options?: any; options?: any;
label: string; label: string;
value?: string | null; value?: string | number | null;
onClick?: any; onClick?: any;
icon: JSX.Element; icon: JSX.Element;
} }
+2 -2
View File
@@ -11,7 +11,7 @@
"wallpaper": "minimal.png", "wallpaper": "minimal.png",
"frame": "s10.png", "frame": "s10.png",
"theme": "taso-dark", "theme": "taso-dark",
"zoom": "100%", "zoom": 1,
"ringtone": "pixel", "ringtone": "pixel",
"ringtoneVol": 100 "ringtoneVol": 100
}, },
@@ -20,7 +20,7 @@
"logLevel": 1 "logLevel": 1
}, },
"frames": ["s10.png"], "frames": ["s10.png"],
"zoomOptions": ["120%", "100%", "80%", "60%", "40%"], "zoomOptions": [1, 0.9, 0.8],
"ringtones": ["marimba", "pixel"], "ringtones": ["marimba", "pixel"],
"themes": { "themes": {
"default-dark": { "default-dark": {
+12 -14
View File
@@ -1,6 +1,7 @@
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { AppIcon } from './AppIcon'; import { AppIcon } from './AppIcon';
import { Grid, makeStyles } from '@material-ui/core'; import { useTranslation } from 'react-i18next';
import { Grid, makeStyles, Tooltip } from '@material-ui/core';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { useKeyboard } from '../../os/keyboard/hooks/useKeyboard'; import { useKeyboard } from '../../os/keyboard/hooks/useKeyboard';
@@ -13,20 +14,20 @@ const useStyles = makeStyles((theme) => ({
width: '20%', width: '20%',
}, },
tooltip: { tooltip: {
bottom: -8, bottom: 0,
fontSize: 12, fontSize: 12,
}, },
})); }));
export const GridMenu = ({ items, Component = AppIcon }) => { export const GridMenu = ({ items, Component = AppIcon }) => {
const { t } = useTranslation();
const setKey = useKeyboard(); const setKey = useKeyboard();
const classes = useStyles(); const classes = useStyles();
useEffect(function registerKeyHandlers() { useEffect(function registerKeyHandlers() {
setKey('ArrowLeft', () => { setKey('ArrowLeft', () => {
console.log(':v'); console.log(':v');
}); });
// eslint-disable-next-line // eslint-disable-next-linep
}, []); }, []);
return ( return (
@@ -35,15 +36,12 @@ export const GridMenu = ({ items, Component = AppIcon }) => {
{items && {items &&
items.length && items.length &&
items.map((item) => ( items.map((item) => (
// <Tooltip <Tooltip
// title={item.id} key={item.id}
// placement='top' title={t(item.nameLocale)}
// arrow placement="bottom"
// classes={{ tooltip: classes.tooltip }} classes={{ tooltip: classes.tooltip }}
// PopperProps={{ >
// anchorEl={}
// }}
// >
<Grid <Grid
key={item.id} key={item.id}
item item
@@ -53,7 +51,7 @@ export const GridMenu = ({ items, Component = AppIcon }) => {
> >
<Component {...item} /> <Component {...item} />
</Grid> </Grid>
// </Tooltip> </Tooltip>
))} ))}
</Grid> </Grid>
</Grid> </Grid>