Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
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
6 changes: 5 additions & 1 deletion src/htmlContent/pane.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<div id="{{id}}" class="view-pane">
<div class="pane-header"></div>
<div class="pane-header">
<div class="pane-header-text"></div>
<div class="pane-header-flipview-btn flipview-icon-none"></div>
<div class="pane-header-close-btn file-status-icon can-close"></div>
</div>
<div class="pane-content">
<div class="not-editor"></div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/nls/root/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,10 @@ define({
"BASEURL_ERROR_HASH_DISALLOWED" : "The base URL can't contain hashes like \"{0}\".",
"BASEURL_ERROR_INVALID_CHAR" : "Special characters like '{0}' must be %-encoded.",
"BASEURL_ERROR_UNKNOWN_ERROR" : "Unknown error parsing Base URL",

//Strings for Pane.js
"EMPTY_VIEW_HEADER" : "<em>Open a file while this pane has focus</em>",
"FLIPVIEW_BTN_TOOLTIP" : "Flip this view to {0} pane",

// Strings for themes-settings.html and themes-general.html
"CURRENT_THEME" : "Current Theme",
Expand Down Expand Up @@ -767,6 +770,8 @@ define({
"DESCRIPTION_FONT_SMOOTHING" : "Mac-only: \"subpixel-antialiased\" to enable sub-pixel antialiasing or \"antialiased\" for gray scale antialiasing",
"DESCRIPTION_OPEN_PREFS_IN_SPLIT_VIEW" : "false to disable opening preferences file in split view",
"DESCRIPTION_OPEN_USER_PREFS_IN_SECOND_PANE" : "false to open user preferences file in left/top pane",
"DESCRIPTION_MERGE_PANES_WHEN_LAST_FILE_CLOSED" : "true to collapse panes after the last file from the pane is closed via pane header close button",
"DESCRIPTION_SHOW_PANE_HEADER_BUTTONS" : "Toggle when to show the close and flip-view buttons on the header.",
"DEFAULT_PREFERENCES_JSON_HEADER_COMMENT" : "/*\n * This is a read-only file with the preferences supported\n * by {APP_NAME}.\n * Use this file as a reference to modify your preferences\n * file \"brackets.json\" opened in the other pane.\n * For more information on how to use preferences inside\n * {APP_NAME}, refer to the web page at https://github.com/adobe/brackets/wiki/How-to-Use-Brackets#preferences\n */",
"DEFAULT_PREFERENCES_JSON_DEFAULT" : "Default"
});
90 changes: 89 additions & 1 deletion src/styles/brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,97 @@ a, img {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;


&-text {
display: inline;
}

.dark & {
background-color: #1d1f21; // not using a variable on purpose.
border-bottom-color: rgba(255, 255, 255, 0.05);
}

&-flipview-btn {
position: relative;
display: none;
top: 0px;
padding-top: 2px;
padding-right: 4px;
padding-left: 4px;
margin-left: 0;
margin-bottom: 0;
.sprite-icon(0, 0, 13px, 13px, "images/flip-view-icons.svg");
background-origin: content-box;
-webkit-transform: translateZ(0); // forces GPU mode for better filter rendering on retina
transform: translateZ(0); // future proofing
-webkit-filter: drop-shadow(0 1px 0 rgba(0,0,0,0.36));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter has a standardized version. It'd probably be best to add that too like you did with transform.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @le717, fixed those 👍

RE: the filter declaration, there are some other components using the plain vendor-prefixed versions of ones that have standardized ones available, might be worth checking out.

filter: drop-shadow(0 1px 0 rgba(0,0,0,0.36));
z-index: 1;
vertical-align: middle;

&:hover {
background-image: url("images/flip-view-icons-hover.svg")
}

&.flipview-icon-none {
display: none;
}

&.flipview-icon-top {
background-position: center 1px;
}

&.flipview-icon-right {
background-position: center -18px;
}

&.flipview-icon-bottom {
background-position: center -35px;
}

&.flipview-icon-left {
background-position: center -54px;
}
}

&-close-btn {
position: relative;
display: none;
height: 16px;
width: 16px;
float: right;
margin-top: -2px;

&:before {
color: rgba(0, 0, 0, 0.5);
}

&:hover:before {
color: rgba(0, 0, 0, 0.8);
}

.dark & {
&:before {
color: rgba(255, 255, 255, 0.5);
}

&:hover:before {
color: rgba(255, 255, 255, 0.8);
}
}
}

&:hover, &.always-show-header-buttons {
> .pane-header-flipview-btn:not(.flipview-icon-none) {
display: inline-block;
}

> .pane-header-close-btn {
display: inline;
}
}
}

.active-pane {

.pane-header {
Expand Down Expand Up @@ -755,6 +840,7 @@ a, img {
-webkit-filter: drop-shadow(0 1px 0 rgba(0,0,0,0.36));
z-index: 1;
}

.splitview-icon-none {
background-position: center 1px;
}
Expand All @@ -765,6 +851,8 @@ a, img {
background-position: center -41px;
}



// Show splitview icons on the button's dropdown menu too
#splitview-menu ul.dropdown-menu > li {
.menu-name::before {
Expand Down
67 changes: 67 additions & 0 deletions src/styles/images/flip-view-icons-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions src/styles/images/flip-view-icons-hover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions src/styles/images/flip-view-icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading