From 0dc5857247b290b28a0f359b7f56da2c1597b3a1 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Wed, 16 Aug 2023 15:27:48 +0200 Subject: [PATCH] Middle Column: Make empty background draggable in Electron (#3751) --- src/components/middle/MiddleColumn.module.scss | 4 ++++ src/components/middle/MiddleColumn.tsx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/components/middle/MiddleColumn.module.scss b/src/components/middle/MiddleColumn.module.scss index dfa36b139..3d74da5a7 100644 --- a/src/components/middle/MiddleColumn.module.scss +++ b/src/components/middle/MiddleColumn.module.scss @@ -41,6 +41,10 @@ } } + &.draggable { + -webkit-app-region: drag; + } + &.customBgImage.blurred::before { filter: blur(12px); } diff --git a/src/components/middle/MiddleColumn.tsx b/src/components/middle/MiddleColumn.tsx index e9067e956..cb56deae8 100644 --- a/src/components/middle/MiddleColumn.tsx +++ b/src/components/middle/MiddleColumn.tsx @@ -23,6 +23,7 @@ import { MAX_SCREEN_WIDTH_FOR_EXPAND_PINNED_MESSAGES, EDITABLE_INPUT_ID, EDITABLE_INPUT_CSS_SELECTOR, + IS_ELECTRON, } from '../../config'; import { IS_ANDROID, IS_IOS, IS_TRANSLATION_SUPPORTED, MASK_IMAGE_DISABLED, @@ -413,6 +414,7 @@ function MiddleColumn({ backgroundColor && styles.customBgColor, customBackground && isBackgroundBlurred && styles.blurred, isRightColumnShown && styles.withRightColumn, + IS_ELECTRON && !(renderingChatId && renderingThreadId) && styles.draggable, ); const messagingDisabledClassName = buildClassName(