Skip to content

A full-featured download manager.

fix: Windows title bar drag

Dr_rOot1bdaeeb3a64f
diff --git a/src/renderer/components/Native/TitleBar.vue b/src/renderer/components/Native/TitleBar.vue
index 26ee016c..1b135344 100644
--- a/src/renderer/components/Native/TitleBar.vue
+++ b/src/renderer/components/Native/TitleBar.vue
@@ -1,5 +1,6 @@
<template>
<div class="title-bar">
+ <div class="title-bar-dragger"></div>
<ul v-if="showActions" class="window-actions">
<li @click="handleMinimize">
<mo-icon name="win-minimize" width="12" height="12" />
@@ -50,19 +51,41 @@
</script>
<style lang="scss">
+.title-bar {
+ position: fixed;
+ top: 0;
+ left: 0;
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ height: 36px;
+ z-index: 5000;
+ .title-bar-dragger {
+ flex: 1;
+ user-select: none;
+ -webkit-app-region: drag;
+ -webkit-user-select: none;
+ }
.window-actions {
- position: fixed;
- top: 0;
- right: 24px;
+ opacity: 0.4;
+ transition: $--fade-transition;
list-style: none;
padding: 0;
margin: 0;
+ z-index: 5100;
> li {
- float: left;
+ display: inline-block;
padding: 5px 10px;
+ margin: 0 5px;
&:hover {
background-color: $--titlebar-actions-active-background;
}
}
}
+ &:hover {
+ .window-actions {
+ opacity: 1;
+ }
+ }
+}
</style>
diff --git a/src/renderer/components/Theme/Base.scss b/src/renderer/components/Theme/Base.scss
index 93f9baf3..1bdf3231 100644
--- a/src/renderer/components/Theme/Base.scss
+++ b/src/renderer/components/Theme/Base.scss
@@ -21,26 +21,6 @@ img {
@include clearfix();
}
-.title-bar {
- position: fixed;
- top: 0;
- width: 100%;
- height: 40px;
- user-select: none;
- -webkit-app-region: drag;
- -webkit-user-select: none;
- z-index: 5000;
- &> .window-actions {
- opacity: 0.4;
- transition: $--fade-transition;
- }
- &:hover {
- .window-actions {
- opacity: 1;
- }
- }
-}
-
#app,
#container {
height: 100%;