Closed AlecRust closed 7 years ago
Ideally there isn't a top bar at all when the plugin is installed. Do you have a screenshot?
I just mean the top bar area i.e.
Does any more than the space between the window controls and the badges.js
tab need to be draggable?
You could disable window dragging for any region you want using your styles.less
configuration. For example to disable window dragging in the tree-view
and status-bar
areas:
.no-title-bar:not(.fullscreen) > atom-workspace {
.tree-view,
.status-bar
{
-webkit-app-region: no-drag;
}
}
Let me know if that helps resolve this issue for you @AlecRust!
Thanks for that - very useful! That does indeed fix the issue in the sidebar, though the behaviour remains everywhere else like the search results tab (I often move the window by clicking a search result) bottom expanding panel, new right-hand panel (GitHub) and the "no tabs open" blank screen.
I can try to include all these areas in the CSS you provided, but since this behaviour didn't exist before installing this package shouldn't it be fixed here?
It's more a matter of personal preference as opposed to a matter of broken/fixed. I prefer to be able to drag the window given any empty space anywhere in the Atom application except for a few specific spots. It seems like your preference is to enable window dragging only for a few specific places.
If this functionality were provided by scripts then I could provide a configuration hook to allows users to toggle on/off dragging for every specified area. However the way this tool is implemented is almost entirely by stylesheets, which are all or nothing. Thankfully a user's styles.less
provides a nice way to override whatever defaults you wish to modify.
Hrmmm, how about this as a solution for your preferences:
// First, disable window dragging EVERYWHERE in Atom:
.no-title-bar:not(.fullscreen) > atom-workspace {
-webkit-app-region: no-drag !important;
}
// Then, specifically enable it in very specific areas only, such as the tab bar:
.no-title-bar:not(.fullscreen) > atom-workspace {
.tab-bar {
-webkit-app-region: drag !important;
}
// optionally disable dragging on the tabs themselves so you can re-order them?
}
// Specifically enable dragging in the area above the tree view, to the left of the tab bar:
.platform-darwin.no-title-bar:not(.fullscreen):not(.hidden-title-bar)
atom-panel-container.left:empty + atom-workspace-axis.vertical
.pane:nth-child(1)
.tab-bar
{
-webkit-app-region: drag !important;
}
This solves my problem completely, thank you 🙂
I have my Atom window centred in my screen at a certain position. I often slightly drag the Atom window by accident when clicking around since installing this plugin, since the sidebar and large areas such as the Project Find Results tab are now draggable.
Shouldn't just the top bar be draggable?