Remove panel element

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2020-12-20 19:48:24 +01:00
parent 7dd7aeffed
commit 6758734593
2 changed files with 48 additions and 45 deletions

View File

@ -28,50 +28,55 @@ limitations under the License.
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; justify-content: center;
align-items: center;
overflow: hidden; overflow: hidden;
} }
.mainImage { .mainImage {
//margin: auto; object-fit: contain;
pointer-events: all;
max-width: 100vw;
max-height: 90vh;
min-width: 100px;
min-height: 100px;
&:hover { &:hover {
cursor: grab; cursor: grab;
} }
} }
.mx_ImageView_content img { .mx_ImageView_panel {
object-fit: contain; position: absolute;
z-index: 1000;
align-self: flex-start;
pointer-events: all; pointer-events: all;
} }
.mx_ImageView_panel {
display: flex;
justify-content: space-between;
padding: 50px;
position: absolute;
width: 100%;
}
.mx_ImageView_toolbar { .mx_ImageView_toolbar {
right: 0;
padding: 50px 50px 0 0;
display: flex; display: flex;
}
.mx_ImageView_button {
padding: 5px;
} }
.mx_ImageView_label { .mx_ImageView_label {
left: 0;
padding: 50px 0 0 50px;
text-align: left; text-align: left;
display: flex; display: flex;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
min-height: 100%;
max-width: 240px; max-width: 240px;
color: $lightbox-fg-color; color: $lightbox-fg-color;
} }
.mx_ImageView_button {
padding: 5px;
}
.mx_ImageView_name { .mx_ImageView_name {
font-size: $font-18px; font-size: $font-18px;
margin-bottom: 6px; margin-bottom: 6px;

View File

@ -260,35 +260,33 @@ export default class ImageView extends React.Component {
ref={ref => this.focusLock = ref} ref={ref => this.focusLock = ref}
> >
<div className="mx_ImageView_content"> <div className="mx_ImageView_content">
<div className="mx_ImageView_panel"> <div className="mx_ImageView_panel mx_ImageView_label">
<div className="mx_ImageView_label"> <div className="mx_ImageView_name">
<div className="mx_ImageView_name"> { this.getName() }
{ this.getName() }
</div>
{ metadata }
<span className="mx_ImageView_size">{ sizeRes }</span>
</div>
<div className="mx_ImageView_toolbar">
<AccessibleButton className="mx_ImageView_button" title={_t("Zoom in")} onClick={ this.onZoomInClick }>
<img src={require("../../../../res/img/plus-white.svg")} alt={ _t('Zoom in') } width="18" height="18" />
</AccessibleButton>
<AccessibleButton className="mx_ImageView_button" title={_t("Zoom out")} onClick={ this.onZoomOutClick }>
<img src={require("../../../../res/img/minus-white.svg")} alt={ _t('Zoom out') } width="18" height="18" />
</AccessibleButton>
<AccessibleButton className="mx_ImageView_button" title={_t("Rotate Left")} onClick={ this.onRotateCounterClockwiseClick }>
<img src={require("../../../../res/img/rotate-ccw.svg")} alt={ _t('Rotate counter-clockwise') } width="18" height="18" />
</AccessibleButton>
<AccessibleButton className="mx_ImageView_button" title={_t("Rotate Right")} onClick={ this.onRotateClockwiseClick }>
<img src={require("../../../../res/img/rotate-cw.svg")} alt={ _t('Rotate clockwise') } width="18" height="18" />
</AccessibleButton>
<a className="mx_ImageView_button" href={ this.props.src } download={ this.props.name } title={_t("Download")} target="_blank" rel="noopener">
<img src={require("../../../../res/img/download-white.svg")} width="18" height="18" alt={ _t('Download') } />
</a>
{ redactButton }
<AccessibleButton className="mx_ImageView_button" title={_t("Close")} onClick={ this.props.onFinished }>
<img src={require("../../../../res/img/cancel-white.svg")} width="18" height="18" alt={ _t('Close') } />
</AccessibleButton>
</div> </div>
{ metadata }
<span className="mx_ImageView_size">{ sizeRes }</span>
</div>
<div className="mx_ImageView_panel mx_ImageView_toolbar">
<AccessibleButton className="mx_ImageView_button" title={_t("Zoom in")} onClick={ this.onZoomInClick }>
<img src={require("../../../../res/img/plus-white.svg")} alt={ _t('Zoom in') } width="18" height="18" />
</AccessibleButton>
<AccessibleButton className="mx_ImageView_button" title={_t("Zoom out")} onClick={ this.onZoomOutClick }>
<img src={require("../../../../res/img/minus-white.svg")} alt={ _t('Zoom out') } width="18" height="18" />
</AccessibleButton>
<AccessibleButton className="mx_ImageView_button" title={_t("Rotate Left")} onClick={ this.onRotateCounterClockwiseClick }>
<img src={require("../../../../res/img/rotate-ccw.svg")} alt={ _t('Rotate counter-clockwise') } width="18" height="18" />
</AccessibleButton>
<AccessibleButton className="mx_ImageView_button" title={_t("Rotate Right")} onClick={ this.onRotateClockwiseClick }>
<img src={require("../../../../res/img/rotate-cw.svg")} alt={ _t('Rotate clockwise') } width="18" height="18" />
</AccessibleButton>
<a className="mx_ImageView_button" href={ this.props.src } download={ this.props.name } title={_t("Download")} target="_blank" rel="noopener">
<img src={require("../../../../res/img/download-white.svg")} width="18" height="18" alt={ _t('Download') } />
</a>
{ redactButton }
<AccessibleButton className="mx_ImageView_button" title={_t("Close")} onClick={ this.props.onFinished }>
<img src={require("../../../../res/img/cancel-white.svg")} width="18" height="18" alt={ _t('Close') } />
</AccessibleButton>
</div> </div>
<img <img
src={this.props.src} src={this.props.src}