2018-04-12 07:23:35 +08:00
|
|
|
/*
|
2024-09-09 21:57:16 +08:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2018-04-12 07:23:35 +08:00
|
|
|
Copyright 2015, 2016 OpenMarket Ltd
|
|
|
|
|
2024-09-09 21:57:16 +08:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
|
|
|
Please see LICENSE files in the repository root for full details.
|
2018-04-12 07:23:35 +08:00
|
|
|
*/
|
|
|
|
|
2021-07-14 15:06:41 +08:00
|
|
|
$button-size: 32px;
|
|
|
|
$icon-size: 22px;
|
|
|
|
$button-gap: 24px;
|
|
|
|
|
2021-09-21 23:34:50 +08:00
|
|
|
:root {
|
|
|
|
--image-view-panel-height: 68px;
|
|
|
|
}
|
|
|
|
|
2018-04-12 07:23:35 +08:00
|
|
|
.mx_ImageView {
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2021-02-24 18:15:59 +08:00
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_ImageView_image_wrapper {
|
2021-06-06 09:08:44 +08:00
|
|
|
pointer-events: initial;
|
2020-12-19 16:26:09 +08:00
|
|
|
display: flex;
|
2020-12-21 02:48:24 +08:00
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
2021-02-24 18:15:59 +08:00
|
|
|
height: 100%;
|
2020-12-21 00:40:16 +08:00
|
|
|
overflow: hidden;
|
2020-12-20 17:07:03 +08:00
|
|
|
}
|
|
|
|
|
2021-02-24 18:15:59 +08:00
|
|
|
.mx_ImageView_image {
|
2021-04-24 14:03:39 +08:00
|
|
|
flex-shrink: 0;
|
2021-09-21 23:59:13 +08:00
|
|
|
|
|
|
|
&.mx_ImageView_image_animating {
|
|
|
|
transition: transform 200ms ease 0s;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.mx_ImageView_image_animatingLoading {
|
|
|
|
transition: transform 300ms ease 0s;
|
|
|
|
}
|
2018-04-12 07:23:35 +08:00
|
|
|
}
|
|
|
|
|
2020-12-19 16:26:09 +08:00
|
|
|
.mx_ImageView_panel {
|
2021-02-24 15:11:53 +08:00
|
|
|
width: 100%;
|
2021-09-21 23:34:50 +08:00
|
|
|
height: var(--image-view-panel-height);
|
2021-02-24 14:54:36 +08:00
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
2021-02-24 15:11:53 +08:00
|
|
|
align-items: center;
|
2021-07-23 03:25:11 +08:00
|
|
|
animation-name: mx_ImageView_panel_keyframes;
|
2021-07-23 14:00:51 +08:00
|
|
|
animation-duration: 300ms;
|
2020-12-19 16:26:09 +08:00
|
|
|
}
|
|
|
|
|
2021-02-24 21:43:33 +08:00
|
|
|
.mx_ImageView_info_wrapper {
|
2021-06-06 09:08:44 +08:00
|
|
|
pointer-events: initial;
|
2021-02-24 21:43:33 +08:00
|
|
|
padding-left: 32px;
|
2018-04-12 07:23:35 +08:00
|
|
|
display: flex;
|
2021-02-24 21:43:33 +08:00
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
2021-02-25 18:50:50 +08:00
|
|
|
color: $lightbox-fg-color;
|
2023-01-24 03:01:11 +08:00
|
|
|
flex-grow: 1;
|
|
|
|
flex-basis: 0;
|
2021-02-24 21:43:33 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.mx_ImageView_info {
|
|
|
|
padding-left: 12px;
|
2021-02-25 03:04:25 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2018-04-12 07:23:35 +08:00
|
|
|
}
|
|
|
|
|
2021-04-02 14:31:42 +08:00
|
|
|
.mx_ImageView_info_sender {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2022-05-14 16:31:53 +08:00
|
|
|
.mx_ImageView_title {
|
|
|
|
color: $lightbox-fg-color;
|
|
|
|
font-size: $font-12px;
|
2023-01-24 03:01:11 +08:00
|
|
|
flex-grow: 1;
|
|
|
|
flex-basis: 0;
|
|
|
|
text-align: center;
|
2022-05-14 16:31:53 +08:00
|
|
|
}
|
|
|
|
|
2021-02-25 18:50:50 +08:00
|
|
|
.mx_ImageView_toolbar {
|
|
|
|
padding-right: 16px;
|
2021-06-06 09:08:44 +08:00
|
|
|
pointer-events: initial;
|
2021-02-25 18:50:50 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2023-01-24 03:01:11 +08:00
|
|
|
flex-grow: 1;
|
|
|
|
flex-basis: 0;
|
|
|
|
justify-content: flex-end;
|
2021-07-14 15:06:41 +08:00
|
|
|
gap: calc($button-gap - ($button-size - $icon-size));
|
2021-02-25 18:50:50 +08:00
|
|
|
}
|
|
|
|
|
2020-12-21 02:48:24 +08:00
|
|
|
.mx_ImageView_button {
|
2021-07-14 15:06:41 +08:00
|
|
|
padding: calc(($button-size - $icon-size) / 2);
|
2021-02-24 21:43:33 +08:00
|
|
|
display: block;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
content: "";
|
2021-07-14 15:06:41 +08:00
|
|
|
height: $icon-size;
|
|
|
|
width: $icon-size;
|
2021-02-24 21:43:33 +08:00
|
|
|
mask-repeat: no-repeat;
|
|
|
|
mask-size: contain;
|
|
|
|
mask-position: center;
|
|
|
|
display: block;
|
|
|
|
background-color: $icon-button-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_ImageView_button_rotateCW::before {
|
|
|
|
mask-image: url("$(res)/img/image-view/rotate-cw.svg");
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_ImageView_button_rotateCCW::before {
|
|
|
|
mask-image: url("$(res)/img/image-view/rotate-ccw.svg");
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_ImageView_button_zoomOut::before {
|
|
|
|
mask-image: url("$(res)/img/image-view/zoom-out.svg");
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_ImageView_button_zoomIn::before {
|
|
|
|
mask-image: url("$(res)/img/image-view/zoom-in.svg");
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_ImageView_button_download::before {
|
|
|
|
mask-image: url("$(res)/img/image-view/download.svg");
|
|
|
|
}
|
|
|
|
|
2021-02-25 01:13:12 +08:00
|
|
|
.mx_ImageView_button_more::before {
|
|
|
|
mask-image: url("$(res)/img/image-view/more.svg");
|
|
|
|
}
|
|
|
|
|
2021-02-24 21:43:33 +08:00
|
|
|
.mx_ImageView_button_close {
|
2021-07-14 15:06:41 +08:00
|
|
|
padding: calc($button-size - $button-size);
|
2021-02-25 15:10:54 +08:00
|
|
|
border-radius: 100%;
|
2022-07-27 21:39:29 +08:00
|
|
|
background: #21262c; /* same on all themes */
|
2021-02-24 21:43:33 +08:00
|
|
|
&::before {
|
2021-07-14 15:06:41 +08:00
|
|
|
width: $button-size;
|
|
|
|
height: $button-size;
|
2024-10-02 18:06:17 +08:00
|
|
|
mask-image: url("@vector-im/compound-design-tokens/icons/close.svg");
|
|
|
|
mask-size: 24px;
|
2021-02-24 21:43:33 +08:00
|
|
|
}
|
2020-12-21 02:48:24 +08:00
|
|
|
}
|
2021-09-21 23:59:13 +08:00
|
|
|
|
|
|
|
@media (prefers-reduced-motion) {
|
|
|
|
.mx_ImageView_image_animating {
|
|
|
|
transition: none !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mx_ImageView_image_animatingLoading {
|
|
|
|
transition: none !important;
|
|
|
|
}
|
|
|
|
}
|