Fixed taskbar for mobile
This commit is contained in:
parent
152dbd99e4
commit
7c59e7e906
3 changed files with 38 additions and 15 deletions
|
|
@ -5,4 +5,5 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ function AppButton({ app }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
|
key={app.id}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
className={classNames.join(" ")}
|
className={classNames.join(" ")}
|
||||||
onClick={() => { windowsManager.open(app.id); }}
|
onClick={() => { windowsManager.open(app.id); }}
|
||||||
|
|
@ -134,10 +135,12 @@ export function Taskbar() {
|
||||||
</OutsideClickListener>
|
</OutsideClickListener>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles["App-icons"]} onScroll={onUpdate} onResize={onUpdate} ref={ref} style={{ boxShadow }}>
|
<div className={styles["App-icons"]} style={{ boxShadow }}>
|
||||||
{ApplicationsManager.APPLICATIONS.map((app) =>
|
<div className={styles["App-icons-inner"]} onScroll={onUpdate} onResize={onUpdate} ref={ref}>
|
||||||
<AppButton app={app} key={app.id}/>
|
{ApplicationsManager.APPLICATIONS.map((app) =>
|
||||||
)}
|
<AppButton app={app} key={app.id}/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles["Util-icons"]}>
|
<div className={styles["Util-icons"]}>
|
||||||
<Battery/>
|
<Battery/>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Task-bar button:hover, .Task-bar button:focus-visible {
|
.Task-bar button:hover,
|
||||||
|
.Task-bar button:focus-visible {
|
||||||
background-color: var(--task-bar-button-hover-color);
|
background-color: var(--task-bar-button-hover-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -44,43 +45,60 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.Menu-icons,
|
.Menu-icons,
|
||||||
.App-icons {
|
.App-icons-inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-icons {
|
.App-icons {
|
||||||
overflow-x: auto;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
overflow: hidden;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-icons::-webkit-scrollbar {
|
.App-icons-inner {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
pointer-events: auto;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.App-icons-inner::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-icons > *,
|
.App-icons-inner > *,
|
||||||
.Menu-button {
|
.Menu-button {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-icons > * > svg,
|
.App-icons-inner > * > svg,
|
||||||
.Menu-button > svg {
|
.Menu-button > svg {
|
||||||
height: 1.25rem;
|
height: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.App-icons-inner div,
|
||||||
|
.App-icons-inner div > svg,
|
||||||
.Menu-icons div,
|
.Menu-icons div,
|
||||||
.Menu-icons div > svg,
|
.Menu-icons div > svg {
|
||||||
.App-icons div,
|
|
||||||
.App-icons div > svg {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-icon {
|
.App-icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
pointer-events: all;
|
width: var(--task-bar-height);
|
||||||
|
height: var(--task-bar-height);
|
||||||
|
aspect-ratio: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-icon::after {
|
.App-icon::after {
|
||||||
|
|
@ -96,7 +114,8 @@
|
||||||
-webkit-transform: translateX(-50%);
|
-webkit-transform: translateX(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-icon:hover::after, .App-icon:focus-visible::after {
|
.App-icon:hover::after,
|
||||||
|
.App-icon:focus-visible::after {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue