Skip to content

Commit

Permalink
Icons Added for Title Bar. Functions are a bit "sticky"? Sometimes it…
Browse files Browse the repository at this point in the history
… takes multiple clicks for Maximize to toggle.
  • Loading branch information
123789g committed Apr 24, 2024
1 parent 333143d commit f8ec25b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/Title.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import "./Title.css";
import { appWindow } from "@tauri-apps/api/window";
import Close from "./assets/titlebar/Close.png"
import Maximize from "./assets/titlebar/Maximize.png"
import Minimize from "./assets/titlebar/Minimize.png"

function Title() {

// Window Functions abstracted to their own functions because calling them inline onClick made them unresponsive.
const minimizeWindow = () => {
appWindow.minimize()
}
Expand All @@ -19,20 +23,20 @@ function Title() {
<div data-tauri-drag-region className="titlebar">
<div className="titlebar-button" id="titlebar-minimize">
<img
src="https://api.iconify.design/mdi:window-minimize.svg"
src={Minimize}
alt="minimize"
onClick={minimizeWindow}
/>
</div>
<div className="titlebar-button" id="titlebar-maximize">
<img
src="https://api.iconify.design/mdi:window-maximize.svg"
src={Maximize}
alt="maximize"
onClick={maximizeWindow}
/>
</div>
<div className="titlebar-button" id="titlebar-close">
<img src="https://api.iconify.design/mdi:close.svg" alt="close" onClick={closeWindow} />
<img src={Close} alt="close" onClick={closeWindow} />
</div>
</div>
</body>
Expand Down
1 change: 0 additions & 1 deletion src/assets/react.svg

This file was deleted.

Binary file added src/assets/titlebar/Close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/titlebar/Maximize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/titlebar/Minimize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f8ec25b

Please sign in to comment.