From c31d855332fe5fa98acbbdd6a7ed7dc83dd48149 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Mon, 28 Dec 2015 17:52:40 -0800 Subject: [PATCH 01/20] Enable hidden-inset on OS X --- src/browser/atom-window.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/browser/atom-window.coffee b/src/browser/atom-window.coffee index c507b634c..3329ad618 100644 --- a/src/browser/atom-window.coffee +++ b/src/browser/atom-window.coffee @@ -26,6 +26,7 @@ class AtomWindow options = show: false title: 'Atom' + 'title-bar-style': 'hidden-inset' 'web-preferences': 'direct-write': true From 69ac7b1aa0f0a3864e628e621d03d3300c4fd6fb Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Mon, 28 Dec 2015 17:53:00 -0800 Subject: [PATCH 02/20] Fix up dragging and leave an indent on left panels --- static/panes.less | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/static/panes.less b/static/panes.less index a1a649e54..95d055b6e 100644 --- a/static/panes.less +++ b/static/panes.less @@ -88,3 +88,25 @@ atom-pane-container { } } } + +.platform-darwin { + body { + -webkit-app-region: drag; + + .tool-panel { + -webkit-app-region: no-drag; + } + + .tab { + -webkit-app-region: no-drag; + } + + editor { + -webkit-app-region: no-drag; + } + } + + atom-panel.left { + padding-top: 36px; + } +} From d1348b7868dc117c2cfe9a1c507824dfea080328 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Wed, 30 Dec 2015 13:30:22 -0800 Subject: [PATCH 03/20] -webkit-app-region doesn't actually do anything because we're not frameless --- static/panes.less | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/static/panes.less b/static/panes.less index 95d055b6e..fc322c181 100644 --- a/static/panes.less +++ b/static/panes.less @@ -90,20 +90,8 @@ atom-pane-container { } .platform-darwin { - body { - -webkit-app-region: drag; - - .tool-panel { - -webkit-app-region: no-drag; - } - - .tab { - -webkit-app-region: no-drag; - } - - editor { - -webkit-app-region: no-drag; - } + atom-panel-container.left:empty + atom-workspace-axis.vertical .tab-bar { + padding-left: 100px; } atom-panel.left { From e3ff7e28a190bb58d0132cd38fc19d2f9a66ee24 Mon Sep 17 00:00:00 2001 From: simurai Date: Wed, 21 Sep 2016 15:20:03 +0900 Subject: [PATCH 04/20] :fire: Remove paddings Might get added again later. --- static/panes.less | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/static/panes.less b/static/panes.less index 2a5131357..df43f06d8 100644 --- a/static/panes.less +++ b/static/panes.less @@ -105,13 +105,3 @@ atom-pane-container { } } } - -.platform-darwin { - atom-panel-container.left:empty + atom-workspace-axis.vertical .tab-bar { - padding-left: 100px; - } - - atom-panel.left { - padding-top: 36px; - } -} From 005e091759fd4e5c6805fdda970bcf11029668b8 Mon Sep 17 00:00:00 2001 From: simurai Date: Wed, 21 Sep 2016 15:26:17 +0900 Subject: [PATCH 05/20] Increase title-bar height to fit the traffic lights when `titleBarStyle = 'hidden-inset'` is used. --- static/title-bar.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/title-bar.less b/static/title-bar.less index 8191bc278..ccb23c3db 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -1,7 +1,7 @@ @import "ui-variables"; @title-bar-text-size: 13px; -@title-bar-height: 23px; +@title-bar-height: 36px; @title-bar-background-color: @base-background-color; @title-bar-border-color: @base-border-color; From 1cc79666b100b54a80e8c6815c818b0bd36f3715 Mon Sep 17 00:00:00 2001 From: simurai Date: Wed, 21 Sep 2016 21:19:35 +0900 Subject: [PATCH 06/20] Add custom-title-bar class So themes/packages can adapt to the custom title-bar --- src/atom-environment.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index 63bb7141c..e3029dc33 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -694,6 +694,7 @@ class AtomEnvironment extends Model if process.platform is 'darwin' and @config.get('core.useCustomTitleBar') @workspace.addHeaderPanel({item: new TitleBar({@workspace, @themes, @applicationDelegate})}) + @document.body.classList.add('custom-title-bar') @document.body.appendChild(@views.getView(@workspace)) @backgroundStylesheet?.remove() From e7f204053adda560b8f40afc9c35ab8d440fc4f6 Mon Sep 17 00:00:00 2001 From: simurai Date: Sat, 24 Sep 2016 16:05:33 +0900 Subject: [PATCH 07/20] :art: --- src/main-process/atom-window.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main-process/atom-window.coffee b/src/main-process/atom-window.coffee index d06bf98c8..902e1e251 100644 --- a/src/main-process/atom-window.coffee +++ b/src/main-process/atom-window.coffee @@ -26,7 +26,6 @@ class AtomWindow options = show: false title: 'Atom' - # Add an opaque backgroundColor (instead of keeping the default # transparent one) to prevent subpixel anti-aliasing from being disabled. # We believe this is a regression introduced with Electron 0.37.3, and From 7d611224dedc6d0754cf1163f2a5de404e8b7c8b Mon Sep 17 00:00:00 2001 From: simurai Date: Sat, 24 Sep 2016 16:32:47 +0900 Subject: [PATCH 08/20] Change box-sizing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So that the border doesn’t affect the height. --- static/title-bar.less | 1 + 1 file changed, 1 insertion(+) diff --git a/static/title-bar.less b/static/title-bar.less index ccb23c3db..9176ad3c9 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -10,6 +10,7 @@ body.fullscreen .title-bar { } .title-bar { + box-sizing: content-box; height: @title-bar-height; transition: margin-top 160ms; From a7f049008a71ff7880821bf5fe48f342902e1181 Mon Sep 17 00:00:00 2001 From: simurai Date: Sat, 24 Sep 2016 16:34:09 +0900 Subject: [PATCH 09/20] Increase title-bar padding --- static/title-bar.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/title-bar.less b/static/title-bar.less index 9176ad3c9..efb6a128f 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -23,7 +23,7 @@ body.fullscreen .title-bar { -webkit-user-select: none; -webkit-app-region: drag; - padding: 0 70px; + padding: 0 77px; overflow: hidden; .title { From ed2c72a586052c616c0f151fe9ecbba82e74c7cc Mon Sep 17 00:00:00 2001 From: simurai Date: Sat, 15 Oct 2016 19:12:53 +0900 Subject: [PATCH 10/20] Add option to hide the title bar --- src/atom-environment.coffee | 4 +- src/config-schema.coffee | 9 ++-- src/main-process/atom-application.coffee | 2 +- src/main-process/atom-window.coffee | 10 ++++- static/title-bar.less | 53 +++++++++++++++++++++++- 5 files changed, 69 insertions(+), 9 deletions(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index e3029dc33..78b65bc87 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -692,9 +692,11 @@ class AtomEnvironment extends Model @deserialize(state) if state? @deserializeTimings.atom = Date.now() - startTime - if process.platform is 'darwin' and @config.get('core.useCustomTitleBar') + if process.platform is 'darwin' and @config.get('core.titleBar') is 'custom' @workspace.addHeaderPanel({item: new TitleBar({@workspace, @themes, @applicationDelegate})}) @document.body.classList.add('custom-title-bar') + if process.platform is 'darwin' and @config.get('core.titleBar') is 'hidden' + @document.body.classList.add('hidden-title-bar') @document.body.appendChild(@views.getView(@workspace)) @backgroundStylesheet?.remove() diff --git a/src/config-schema.coffee b/src/config-schema.coffee index e240a6dce..2f5b65e33 100644 --- a/src/config-schema.coffee +++ b/src/config-schema.coffee @@ -272,7 +272,8 @@ if process.platform in ['win32', 'linux'] description: 'Automatically hide the menu bar and toggle it by pressing Alt. This is only supported on Windows & Linux.' if process.platform is 'darwin' - module.exports.core.properties.useCustomTitleBar = - type: 'boolean' - default: false - description: 'Use custom, theme-aware title bar.
Note: This currently does not include a proxy icon.
This setting will require a relaunch of Atom to take effect.' + module.exports.core.properties.titleBar = + type: 'string' + default: 'native' + enum: ['native', 'custom', 'hidden'] + description: 'Use a custom, theme-aware title bar or hide the title bar altogether.
Note: Switching to a custom or hidden title bar will compromise some functionality.
This setting will require a relaunch of Atom to take effect.' diff --git a/src/main-process/atom-application.coffee b/src/main-process/atom-application.coffee index b98ab1c5b..7aa0fd1cc 100644 --- a/src/main-process/atom-application.coffee +++ b/src/main-process/atom-application.coffee @@ -83,7 +83,7 @@ class AtomApplication initialize: (options) -> global.atomApplication = this - @config.onDidChange 'core.useCustomTitleBar', @promptForRestart + @config.onDidChange 'core.titleBar', @promptForRestart @autoUpdateManager = new AutoUpdateManager(@version, options.test, @resourcePath, @config) @applicationMenu = new ApplicationMenu(@version, @autoUpdateManager) diff --git a/src/main-process/atom-window.coffee b/src/main-process/atom-window.coffee index 902e1e251..b6c69a339 100644 --- a/src/main-process/atom-window.coffee +++ b/src/main-process/atom-window.coffee @@ -43,6 +43,9 @@ class AtomWindow if process.platform is 'linux' options.icon = @constructor.iconPath + if @shouldAddCustomTitleBar() + options.titleBarStyle = 'hidden' + if @shouldHideTitleBar() options.titleBarStyle = 'hidden-inset' @@ -227,10 +230,15 @@ class AtomWindow [width, height] = @browserWindow.getSize() {x, y, width, height} + shouldAddCustomTitleBar: -> + not @isSpec and + process.platform is 'darwin' and + @atomApplication.config.get('core.titleBar') is 'custom' + shouldHideTitleBar: -> not @isSpec and process.platform is 'darwin' and - @atomApplication.config.get('core.useCustomTitleBar') + @atomApplication.config.get('core.titleBar') is 'hidden' close: -> @browserWindow.close() diff --git a/static/title-bar.less b/static/title-bar.less index efb6a128f..0c5185a19 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -1,7 +1,9 @@ @import "ui-variables"; +// Custom Title Bar ------------------------------- + @title-bar-text-size: 13px; -@title-bar-height: 36px; +@title-bar-height: 23px; @title-bar-background-color: @base-background-color; @title-bar-border-color: @base-border-color; @@ -23,7 +25,7 @@ body.fullscreen .title-bar { -webkit-user-select: none; -webkit-app-region: drag; - padding: 0 77px; + padding: 0 70px; overflow: hidden; .title { @@ -40,3 +42,50 @@ body.fullscreen .title-bar { color: @text-color-subtle; } } + + +// Hidden Title Bar ------------------------------- + +.hidden-title-bar { + + // Add space for the traffic lights + atom-panel-container.left { + padding-top: 36px; + + // TODO: The .fullscreen class doesn't seem to get added + // So this has currently no effect + .fullscreen & { + padding-top: 0; + } + } + + // Avoid tabs from overlap window controls when sidebar is closed + atom-panel-container.left:empty + atom-workspace-axis.vertical .tab-bar, + atom-panel-container.left:empty + atom-workspace-axis.vertical atom-panel-container.top { + padding-left: 77px; + } + + // Enable dragging + atom-panel-container.left, + .tree-view, + .tab-bar, + .status-bar { + -webkit-app-region: drag; + } + + // Disable dragging (on child elements) + .tree-view > li, + .tree-view-resize-handle, + .tab { + -webkit-app-region: no-drag; + } + + // Modal + atom-panel.modal { + // padding: 0 77px; + top: 36px; + border-top-left-radius: @component-border-radius; + border-top-right-radius: @component-border-radius; + } + +} From f13fd74342f5155eefd6365c41dc82fa09c9c946 Mon Sep 17 00:00:00 2001 From: simurai Date: Sat, 15 Oct 2016 20:53:02 +0900 Subject: [PATCH 11/20] :art: Resolve merge conflict --- src/main-process/atom-application.coffee | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main-process/atom-application.coffee b/src/main-process/atom-application.coffee index e829b32bc..8d1509e38 100644 --- a/src/main-process/atom-application.coffee +++ b/src/main-process/atom-application.coffee @@ -84,11 +84,7 @@ class AtomApplication initialize: (options) -> global.atomApplication = this -<<<<<<< HEAD - @config.onDidChange 'core.titleBar', @promptForRestart -======= - @config.onDidChange 'core.useCustomTitleBar', @promptForRestart.bind(this) ->>>>>>> master + @config.onDidChange 'core.titleBar', @promptForRestart.bind(this) @autoUpdateManager = new AutoUpdateManager( @version, options.test or options.benchmark or options.benchmarkTest, @resourcePath, @config From 32f816164b15c1a7f560e4430a48824df91bc224 Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 21 Oct 2016 11:30:27 +0900 Subject: [PATCH 12/20] Fix atom-panel-container when fullscreen --- static/title-bar.less | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/static/title-bar.less b/static/title-bar.less index 0c5185a19..0972498e3 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -51,12 +51,10 @@ body.fullscreen .title-bar { // Add space for the traffic lights atom-panel-container.left { padding-top: 36px; - - // TODO: The .fullscreen class doesn't seem to get added - // So this has currently no effect - .fullscreen & { - padding-top: 0; - } + transition: padding-top 160ms; + } + &.fullscreen atom-panel-container.left { + padding-top: 0; } // Avoid tabs from overlap window controls when sidebar is closed From f05f0db94bb60baad156500a64add22a3a642025 Mon Sep 17 00:00:00 2001 From: simurai Date: Fri, 21 Oct 2016 13:58:24 +0900 Subject: [PATCH 13/20] Migrate config --- src/main-process/atom-application.coffee | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main-process/atom-application.coffee b/src/main-process/atom-application.coffee index 8d1509e38..afd267106 100644 --- a/src/main-process/atom-application.coffee +++ b/src/main-process/atom-application.coffee @@ -84,6 +84,12 @@ class AtomApplication initialize: (options) -> global.atomApplication = this + # DEPRECATED: This can be removed at some point (added in 1.13) + # It converts `useCustomTitleBar: true` to `titleBar: "custom"` + if process.platform is 'darwin' and @config.get('core.useCustomTitleBar') + @config.unset('core.useCustomTitleBar') + @config.set('core.titleBar', 'custom') + @config.onDidChange 'core.titleBar', @promptForRestart.bind(this) @autoUpdateManager = new AutoUpdateManager( From c0e65a88003881dbd10d25206507f7f6e4a8ab29 Mon Sep 17 00:00:00 2001 From: simurai Date: Tue, 25 Oct 2016 10:25:40 +0900 Subject: [PATCH 14/20] Fix header panels --- static/title-bar.less | 44 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/static/title-bar.less b/static/title-bar.less index 0972498e3..c87d03ca2 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -46,11 +46,14 @@ body.fullscreen .title-bar { // Hidden Title Bar ------------------------------- -.hidden-title-bar { +@traffic-lights-width: 78px; +@traffic-lights-height: 38px; + +.hidden-title-bar:not(.has-header) { // Add space for the traffic lights atom-panel-container.left { - padding-top: 36px; + padding-top: @traffic-lights-height; transition: padding-top 160ms; } &.fullscreen atom-panel-container.left { @@ -60,7 +63,7 @@ body.fullscreen .title-bar { // Avoid tabs from overlap window controls when sidebar is closed atom-panel-container.left:empty + atom-workspace-axis.vertical .tab-bar, atom-panel-container.left:empty + atom-workspace-axis.vertical atom-panel-container.top { - padding-left: 77px; + padding-left: @traffic-lights-width; } // Enable dragging @@ -77,13 +80,36 @@ body.fullscreen .title-bar { .tab { -webkit-app-region: no-drag; } +} - // Modal - atom-panel.modal { - // padding: 0 77px; - top: 36px; - border-top-left-radius: @component-border-radius; - border-top-right-radius: @component-border-radius; + +// Alternative Title Bar ------------------------------- + +.hidden-title-bar { + + // Enable dragging + make space for traffic lights + atom-panel.header:first-child { + box-sizing: content-box; + height: @traffic-lights-height; + padding-left: @traffic-lights-width; + overflow-x: auto; + overflow-y: hidden; + -webkit-app-region: drag; } + // HOW TO: Disable dragging on panels + // .my-panel { + // -webkit-app-region: no-drag; + // } +} + + +// Modal ------------------------------- + +.custom-title-bar atom-panel.modal { + top: @title-bar-height; +} + +.hidden-title-bar atom-panel.modal { + top: @traffic-lights-height; } From 0efcc88b771a4cf62806916ecac94a79cda8ad24 Mon Sep 17 00:00:00 2001 From: simurai Date: Tue, 25 Oct 2016 15:27:42 +0900 Subject: [PATCH 15/20] Keep min-width for left panel container --- static/title-bar.less | 47 ++++++++++++------------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/static/title-bar.less b/static/title-bar.less index c87d03ca2..3c22c8d7f 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -49,28 +49,27 @@ body.fullscreen .title-bar { @traffic-lights-width: 78px; @traffic-lights-height: 38px; -.hidden-title-bar:not(.has-header) { - - // Add space for the traffic lights - atom-panel-container.left { - padding-top: @traffic-lights-height; - transition: padding-top 160ms; - } - &.fullscreen atom-panel-container.left { - padding-top: 0; +.hidden-title-bar:not(.fullscreen) { + atom-panel-container.header:empty + atom-workspace-axis.horizontal atom-panel-container.left { + min-width: 78px; // keep some width for traffic lights when tree-view is hidden + padding-top: @traffic-lights-height; // add space for traffic lights } - // Avoid tabs from overlap window controls when sidebar is closed - atom-panel-container.left:empty + atom-workspace-axis.vertical .tab-bar, - atom-panel-container.left:empty + atom-workspace-axis.vertical atom-panel-container.top { + // Add space for traffic lights in header panels + atom-panel.header:first-child { + box-sizing: content-box; + height: @traffic-lights-height; padding-left: @traffic-lights-width; + overflow-x: auto; + overflow-y: hidden; } // Enable dragging atom-panel-container.left, .tree-view, .tab-bar, - .status-bar { + .status-bar, + atom-panel.header:first-child { -webkit-app-region: drag; } @@ -83,28 +82,8 @@ body.fullscreen .title-bar { } -// Alternative Title Bar ------------------------------- - -.hidden-title-bar { - - // Enable dragging + make space for traffic lights - atom-panel.header:first-child { - box-sizing: content-box; - height: @traffic-lights-height; - padding-left: @traffic-lights-width; - overflow-x: auto; - overflow-y: hidden; - -webkit-app-region: drag; - } - - // HOW TO: Disable dragging on panels - // .my-panel { - // -webkit-app-region: no-drag; - // } -} - - // Modal ------------------------------- +// Prevent traffic lights from overlapping modals .custom-title-bar atom-panel.modal { top: @title-bar-height; From 6010c4d7df19ca417f4e861eff646b13b4ac7b62 Mon Sep 17 00:00:00 2001 From: simurai Date: Sat, 14 Jan 2017 16:06:50 +0900 Subject: [PATCH 16/20] Add custom-inset title-bar --- src/atom-environment.coffee | 3 + src/config-schema.js | 4 +- src/main-process/atom-window.coffee | 10 ++- static/title-bar.less | 104 ++++++++++++++-------------- 4 files changed, 67 insertions(+), 54 deletions(-) diff --git a/src/atom-environment.coffee b/src/atom-environment.coffee index 62ab5937d..e69aeb55e 100644 --- a/src/atom-environment.coffee +++ b/src/atom-environment.coffee @@ -698,6 +698,9 @@ class AtomEnvironment extends Model if process.platform is 'darwin' and @config.get('core.titleBar') is 'custom' @workspace.addHeaderPanel({item: new TitleBar({@workspace, @themes, @applicationDelegate})}) @document.body.classList.add('custom-title-bar') + if process.platform is 'darwin' and @config.get('core.titleBar') is 'custom-inset' + @workspace.addHeaderPanel({item: new TitleBar({@workspace, @themes, @applicationDelegate})}) + @document.body.classList.add('custom-inset-title-bar') if process.platform is 'darwin' and @config.get('core.titleBar') is 'hidden' @document.body.classList.add('hidden-title-bar') diff --git a/src/config-schema.js b/src/config-schema.js index b43cb9e10..52102ec58 100644 --- a/src/config-schema.js +++ b/src/config-schema.js @@ -360,8 +360,8 @@ if (process.platform === 'darwin') { configSchema.core.properties.titleBar = { type: 'string', default: 'native', - enum: ['native', 'custom', 'hidden'], - description: 'Use a custom, theme-aware title bar or hide the title bar altogether.
Note: Switching to a custom or hidden title bar will compromise some functionality.
This setting will require a relaunch of Atom to take effect.' + enum: ['native', 'custom', 'custom-inset', 'hidden'], + description: 'A `custom` title bar adapts to theme colors. Choosing `custom-inset` adds a bit more padding. The title bar can also be completely `hidden`.
Note: Switching to a custom or hidden title bar will compromise some functionality.
This setting will require a relaunch of Atom to take effect.' } } diff --git a/src/main-process/atom-window.coffee b/src/main-process/atom-window.coffee index 7fd119aa7..266f5d292 100644 --- a/src/main-process/atom-window.coffee +++ b/src/main-process/atom-window.coffee @@ -46,9 +46,12 @@ class AtomWindow if @shouldAddCustomTitleBar() options.titleBarStyle = 'hidden' - if @shouldHideTitleBar() + if @shouldAddCustomInsetTitleBar() options.titleBarStyle = 'hidden-inset' + if @shouldHideTitleBar() + options.frame = false + @browserWindow = new BrowserWindow options @atomApplication.addWindow(this) @@ -234,6 +237,11 @@ class AtomWindow process.platform is 'darwin' and @atomApplication.config.get('core.titleBar') is 'custom' + shouldAddCustomInsetTitleBar: -> + not @isSpec and + process.platform is 'darwin' and + @atomApplication.config.get('core.titleBar') is 'custom-inset' + shouldHideTitleBar: -> not @isSpec and process.platform is 'darwin' and diff --git a/static/title-bar.less b/static/title-bar.less index 3c22c8d7f..8d0ad24ed 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -1,33 +1,32 @@ @import "ui-variables"; -// Custom Title Bar ------------------------------- +@title-bar-height: 22px; +@traffic-lights-width: 68px; + +@inset-title-bar-height: 38px; +@inset-traffic-lights-width: 78px; @title-bar-text-size: 13px; -@title-bar-height: 23px; @title-bar-background-color: @base-background-color; @title-bar-border-color: @base-border-color; -body.fullscreen .title-bar { - margin-top: -@title-bar-height; -} + +// Title Bar ------------------------------- .title-bar { - box-sizing: content-box; - height: @title-bar-height; - transition: margin-top 160ms; - - flex-shrink: 0; display: flex; + flex-shrink: 0; align-items: center; justify-content: center; - + overflow: hidden; + box-sizing: content-box; font-size: @title-bar-text-size; + background-color: @title-bar-background-color; + border-bottom: 1px solid @title-bar-border-color; + transition: margin-top 160ms; -webkit-user-select: none; -webkit-app-region: drag; - padding: 0 70px; - overflow: hidden; - .title { flex: 0 1 auto; overflow: hidden; @@ -35,60 +34,63 @@ body.fullscreen .title-bar { text-overflow: ellipsis; } - background-color: @title-bar-background-color; - border-bottom: 1px solid @title-bar-border-color; - .is-blurred & { color: @text-color-subtle; } } -// Hidden Title Bar ------------------------------- +// Custom ------------------------------- -@traffic-lights-width: 78px; -@traffic-lights-height: 38px; - -.hidden-title-bar:not(.fullscreen) { - atom-panel-container.header:empty + atom-workspace-axis.horizontal atom-panel-container.left { - min-width: 78px; // keep some width for traffic lights when tree-view is hidden - padding-top: @traffic-lights-height; // add space for traffic lights - } - - // Add space for traffic lights in header panels - atom-panel.header:first-child { - box-sizing: content-box; - height: @traffic-lights-height; +.custom-title-bar { + .title-bar { + height: @title-bar-height; padding-left: @traffic-lights-width; - overflow-x: auto; - overflow-y: hidden; + padding-right: @traffic-lights-width; } - // Enable dragging + &.fullscreen .title-bar { + margin-top: -@title-bar-height; // hide title bar in fullscreen mode + } + + atom-panel.modal { + top: @title-bar-height; // Move modals down + } +} + + +// Custom Inset ------------------------------- + +.custom-inset-title-bar { + .title-bar { + height: @inset-title-bar-height; + padding-left: @inset-traffic-lights-width; + padding-right: @inset-traffic-lights-width; + } + + &.fullscreen .title-bar { + margin-top: -@inset-title-bar-height; // hide title bar in fullscreen mode + } + + atom-panel.modal { + top: @inset-title-bar-height; // Move modals down + } +} + + +// Hidden ------------------------------- + +.hidden-title-bar { atom-panel-container.left, .tree-view, .tab-bar, - .status-bar, - atom-panel.header:first-child { - -webkit-app-region: drag; + .status-bar { + -webkit-app-region: drag; // Enable dragging } - // Disable dragging (on child elements) .tree-view > li, .tree-view-resize-handle, .tab { - -webkit-app-region: no-drag; + -webkit-app-region: no-drag; // Disable dragging (on child elements) } } - - -// Modal ------------------------------- -// Prevent traffic lights from overlapping modals - -.custom-title-bar atom-panel.modal { - top: @title-bar-height; -} - -.hidden-title-bar atom-panel.modal { - top: @traffic-lights-height; -} From 9631875d8e57bd25ba7d5dd8bad3f28536c80458 Mon Sep 17 00:00:00 2001 From: simurai Date: Tue, 21 Feb 2017 22:26:46 +0900 Subject: [PATCH 17/20] Only allow status-bar to be dragged It's the only area that is there all the time. The other areas change depending on how much content there is. This could lead to wrongly train your muscle memory. --- static/title-bar.less | 9 --------- 1 file changed, 9 deletions(-) diff --git a/static/title-bar.less b/static/title-bar.less index 8d0ad24ed..3eb2c4022 100644 --- a/static/title-bar.less +++ b/static/title-bar.less @@ -81,16 +81,7 @@ // Hidden ------------------------------- .hidden-title-bar { - atom-panel-container.left, - .tree-view, - .tab-bar, .status-bar { -webkit-app-region: drag; // Enable dragging } - - .tree-view > li, - .tree-view-resize-handle, - .tab { - -webkit-app-region: no-drag; // Disable dragging (on child elements) - } } From 65ecab401d8f8e0235c15eb02a898b31118a8aab Mon Sep 17 00:00:00 2001 From: simurai Date: Wed, 22 Feb 2017 09:49:42 +0900 Subject: [PATCH 18/20] Add "Experimental" to the description --- src/config-schema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config-schema.js b/src/config-schema.js index 840f2d7ba..41b5ecbb6 100644 --- a/src/config-schema.js +++ b/src/config-schema.js @@ -502,7 +502,7 @@ if (process.platform === 'darwin') { type: 'string', default: 'native', enum: ['native', 'custom', 'custom-inset', 'hidden'], - description: 'A `custom` title bar adapts to theme colors. Choosing `custom-inset` adds a bit more padding. The title bar can also be completely `hidden`.
Note: Switching to a custom or hidden title bar will compromise some functionality.
This setting will require a relaunch of Atom to take effect.' + description: 'Experimental: A `custom` title bar adapts to theme colors. Choosing `custom-inset` adds a bit more padding. The title bar can also be completely `hidden`.
Note: Switching to a custom or hidden title bar will compromise some functionality.
This setting will require a relaunch of Atom to take effect.' } } From d6f7b98ac4490dda5c0be3a825a72d4984b21c08 Mon Sep 17 00:00:00 2001 From: Thomas Johansen Date: Wed, 22 Feb 2017 09:15:43 +0100 Subject: [PATCH 19/20] :arrow_up: python --- .python-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.python-version b/.python-version index 4712731cc..ecc17b8e9 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -2.7.12 +2.7.13 From 2884fb9fae5d1738df066a67ec358257da53def6 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 23 Feb 2017 13:18:51 +0100 Subject: [PATCH 20/20] :arrow_up: incompatible-packages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92a9920e3..21f78352e 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "go-to-line": "0.32.0", "grammar-selector": "0.49.2", "image-view": "0.61.0", - "incompatible-packages": "0.26.1", + "incompatible-packages": "0.27.0", "keybinding-resolver": "0.36.1", "line-ending-selector": "0.6.1", "link": "0.31.2",