如何制作无框原子?

时间:2015-12-21 18:51:54

标签: css sass atom-editor

我在Atom论坛上发现了以下帖子,有重写Atom UI的脚本。

问题是,我应该把脚本放在哪里?在Atom init脚本中?任何帮助将不胜感激。

https://github.com/atom/electron/blob/master/docs/api/browser-window.md

2 个答案:

答案 0 :(得分:1)

npm -g install asar exstract atom.app/resources/app.asar frame: false, 中删除title: 'Atom',后添加atom-window.coffee app.asar 然后重新打包。

摘要:asar e app.asar a

打包:asar p a app.asar

另见https://github.com/atom/atom/issues/4599

https://github.com/electron/asar

答案 1 :(得分:0)

将其添加到Atom Config(从Atom菜单中选择Config):

core:
  useCustomTitleBar: true

将此附加到Atom样式(从Atom菜单中选择样式表):

// Hide title
.title-bar .title {
  display: none;
}

// Remove background from titlebar and toolbars
.title-bar,
.tool-bar,
.tool-bar button.tool-bar-btn {
  background-color: transparent;
  border-width: 0;
}

// Shift the tabs up
atom-workspace atom-workspace-axis.horizontal {
  // NOTE: comment this out if you want draggable titlebar:
  margin-top: -20px;
}

// Keep the side panels aligned
atom-panel-container{
  &.left {
    margin-top: 20px;
  }
  &.right {
    margin-top: 20px;
  }
}

.fullscreen {
  atom-workspace atom-workspace-axis.horizontal {
    margin-top: 0px;
  }
  atom-panel-container{
    &.left {
      margin-top: 0px;
    }
    &.right {
      margin-top: 0px;
    }
  }
}

atom-workspace atom-panel-container.left:empty + atom-workspace-axis.vertical .tab-bar {
  margin-left: 70px;
}

For more information see here