Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/browser/base/content/ZenUIManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,14 @@ var gZenUIManager = {
get panelUIPosition() {
return gZenVerticalTabsManager._hasSetSingleToolbar ? 'bottomleft topleft' : 'bottomright topright';
},

openSettingsWindow() {
window.openDialog(
'chrome://browser/content/zen-components/windows/zen-settings.xhtml',
'_blank',
'centerscreen,chrome,dialog=no,resizable=no,titlebar'
);
},
};

var gZenVerticalTabsManager = {
Expand Down
5 changes: 5 additions & 0 deletions src/browser/base/content/zen-assets.jar.inc.mn
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
content/browser/zen-styles/zen-welcome.css (content/zen-styles/zen-welcome.css)
content/browser/zen-styles/zen-media-controls.css (content/zen-styles/zen-media-controls.css)

content/browser/zen-styles/windows/zen-settings.css (content/zen-styles/windows/zen-settings.css)

content/browser/zen-styles/zen-panels/bookmarks.css (content/zen-styles/zen-panels/bookmarks.css)
content/browser/zen-styles/zen-panels/extensions.css (content/zen-styles/zen-panels/extensions.css)
content/browser/zen-styles/zen-panels/print.css (content/zen-styles/zen-panels/print.css)
Expand Down Expand Up @@ -81,3 +83,6 @@
# JS Vendor
content/browser/zen-vendor/tsparticles.confetti.bundle.min.js (content/zen-vendor/tsparticles.confetti.bundle.min.js)
content/browser/zen-vendor/motion.min.mjs (content/zen-vendor/motion.min.mjs)

# Windows
content/browser/zen-components/windows/zen-settings.xhtml (zen-components/windows/zen-settings.xhtml)
49 changes: 49 additions & 0 deletions src/browser/base/content/zen-styles/windows/zen-settings.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@namespace html 'http://www.w3.org/1999/xhtml';
@namespace xul 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';

* {
margin: 0;
box-sizing: border-box;
}

:root {
font: message-box;
}

body {
width: 100%;
}

#main-content {
background: var(--zen-themed-toolbar-bg-transparent);
@supports (-moz-osx-font-smoothing: auto) {
appearance: -moz-window-titlebar;
}

user-select: none;
touch-action: none;
pointer-events: auto;

width: 100%;
height: 100%;

overflow-x: hidden;
overflow-y: auto;

gap: 2rem;
padding: 1rem;
}

.section {
width: 100%;
position: relative;
gap: 0.6rem;

.section-content {
width: 100%;
background: var(--zen-toolbar-element-bg);
border-radius: 6px;
padding: 1em;
font-size: 1.1em;
}
}
45 changes: 45 additions & 0 deletions src/browser/base/zen-components/windows/zen-settings.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0"?>

<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<html xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
id="zenSettingsWindow"
style="min-width: 35em; max-width: 35em; min-height: 40em;">
<head>
<linkset>
<html:link
rel="stylesheet"
href="chrome://browser/content/zen-styles/zen-theme.css"
/>
<html:link
rel="stylesheet"
href="chrome://browser/content/zen-styles/windows/zen-settings.css"
/>

<html:link rel="localization" href="browser/preferences/preferences.ftl" />
<html:link rel="localization" href="browser/preferences/zen-preferences.ftl" />
</linkset>

<script src="chrome://browser/content/zenThemeModifier.js"></script>
</head>

<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox id="main-content">
<vbox class="section">
<html:h2 data-l10n-id="pane-general-title"/>
<div class="section-content">
test
</div>
</vbox>
<vbox class="section">
<html:h2 data-l10n-id="pane-general-title"/>
<div class="section-content">
test
</div>
</vbox>
</vbox>
</html:body>
</html>