From 835c10df9e4264bece4e566d381b702aa348b573 Mon Sep 17 00:00:00 2001 From: Nayam Amarshe <25067102+NayamAmarshe@users.noreply.github.com> Date: Mon, 1 Apr 2024 14:34:56 +0530 Subject: [PATCH] Fix #760 --- renderer/atoms/userSettingsAtom.ts | 2 +- .../upscayl-tab/view/ImageOptions.tsx | 30 +++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/renderer/atoms/userSettingsAtom.ts b/renderer/atoms/userSettingsAtom.ts index 3e2b73d..c6a487c 100644 --- a/renderer/atoms/userSettingsAtom.ts +++ b/renderer/atoms/userSettingsAtom.ts @@ -36,7 +36,7 @@ export const turnOffNotificationsAtom = atomWithStorage( export const viewTypeAtom = atomWithStorage<"slider" | "lens">( "viewType", - "lens", + "slider", ); export const lensSizeAtom = atomWithStorage("lensSize", 100); diff --git a/renderer/components/upscayl-tab/view/ImageOptions.tsx b/renderer/components/upscayl-tab/view/ImageOptions.tsx index 1706851..63e6612 100644 --- a/renderer/components/upscayl-tab/view/ImageOptions.tsx +++ b/renderer/components/upscayl-tab/view/ImageOptions.tsx @@ -2,7 +2,7 @@ import { lensSizeAtom, viewTypeAtom } from "@/atoms/userSettingsAtom"; import SidebarClosed from "@/components/icons/SidebarClosed"; import SidebarOpened from "@/components/icons/SidebarOpened"; import { useAtom } from "jotai"; -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; const ImageOptions = ({ zoomAmount, @@ -32,42 +32,46 @@ const ImageOptions = ({ onDoubleClick={(e) => { e.stopPropagation(); }} - className="w-full h-full absolute"> + className="absolute h-full w-full" + >
+ }`} + >
{ setOpenSidebar(!openSidebar); - }}> + }} + > {openSidebar ? ( - + ) : ( - + )}
-
-

Lens View

+

Lens View

{ setViewType(e.target.checked ? "slider" : "lens"); }} /> -

Slider View

+

Slider View

-

Zoom Amount ({zoomAmount}%)

+

Zoom Amount ({zoomAmount}%)

-

Lens Size ({lensSize / 10})

+

Lens Size ({lensSize / 10})