Skip to content

Commit

Permalink
fix: dark & light color
Browse files Browse the repository at this point in the history
  • Loading branch information
ifaouibadi committed Jan 30, 2024
1 parent d6c8392 commit 9ca0531
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
16 changes: 16 additions & 0 deletions res/css/superhero/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,19 @@ h2 .sh_VerifiedIcon {
-webkit-mask-image: url("../../themes/superhero/img/icons/leave.svg") !important;
mask-image: url("../../themes/superhero/img/icons/leave.svg") !important;
}

.cpd-theme-dark svg.light_logo {
display: none !important;
}

.cpd-theme-dark svg.dark_logo {
display: block !important;
}

.cpd-theme-light svg.dark_logo {
display: none !important;
}

.cpd-theme-light svg.light_logo {
display: block !important;
}
23 changes: 23 additions & 0 deletions res/themes/superhero/img/logos/superhero-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions src/components/structures/LeftPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ import PageType from "matrix-react-sdk/src/PageTypes";
import { UserOnboardingButton } from "matrix-react-sdk/src/components/views/user-onboarding/UserOnboardingButton";

import RoomList from "../views/rooms/RoomList";
import { Icon as Superhero } from "../../../res/themes/superhero/img/logos/superhero.svg";
import { Icon as SuperheroDark } from "../../../res/themes/superhero/img/logos/superhero-dark.svg";
import { Icon as SuperheroLight } from "../../../res/themes/superhero/img/logos/superhero-light.svg";

interface IProps {
isMinimized: boolean;
Expand Down Expand Up @@ -370,6 +371,7 @@ export default class LeftPanel extends React.Component<IProps, IState> {
}

public render(): React.ReactNode {
console.log("render changedd");
const roomList = (
<RoomList
onKeyDown={this.onKeyDown}
Expand Down Expand Up @@ -401,7 +403,16 @@ export default class LeftPanel extends React.Component<IProps, IState> {
marginLeft: "10px",
}}
>
<Superhero
<SuperheroLight
className="light_logo"
style={{
width: "112px",
height: "32px",
display: "block",
}}
/>
<SuperheroDark
className="dark_logo"
style={{
width: "112px",
height: "32px",
Expand Down

0 comments on commit 9ca0531

Please sign in to comment.