-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce minimap section headers, a la Xcode (#190759)
* WIP for adding minimap section headers for #74843 * Get section headers rendering * Fix default value of section header font size * Fix tests * Improve section header position * Fix separator display, update after config change * Split too-long headers with an ellipsis * Render section headers on the decorations canvas * Support MARK with just a separator line * Calculate minimap section headers asynchronously * Simplify change * Avoid font variable duplication * Fix issue introduced earlier * Recompute section headers when the language configuration changes * Fix problem in constructing region header range * Parse mark headers in the entire file and then filter out the ones not appearing in comments on the UI side, where tokens info is available --------- Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
- Loading branch information
Showing
22 changed files
with
637 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { isMacintosh, isWindows } from 'vs/base/common/platform'; | ||
|
||
/** | ||
* The best font-family to be used in CSS based on the platform: | ||
* - Windows: Segoe preferred, fallback to sans-serif | ||
* - macOS: standard system font, fallback to sans-serif | ||
* - Linux: standard system font preferred, fallback to Ubuntu fonts | ||
* | ||
* Note: this currently does not adjust for different locales. | ||
*/ | ||
export const DEFAULT_FONT_FAMILY = isWindows ? '"Segoe WPC", "Segoe UI", sans-serif' : isMacintosh ? '-apple-system, BlinkMacSystemFont, sans-serif' : 'system-ui, "Ubuntu", "Droid Sans", sans-serif'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.