This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Add font resizing in project search (#21125)#1153
Closed
dawidowoc wants to merge 1 commit into
Closed
Conversation
dawidowoc
commented
May 9, 2021
|
|
||
| getHeightAdjustedToFontSize(baseHeight) { | ||
| const lineHeight = 2; | ||
| const baseFontSize = 12; |
Author
There was a problem hiding this comment.
12 was the default font size before my changes. I'm treating it as base size for height calculation because some of the existing stylings seems to depend on this value.
dawidowoc
commented
May 9, 2021
| } | ||
|
|
||
| getHeightAdjustedToFontSize(baseHeight) { | ||
| const lineHeight = 2; |
Author
There was a problem hiding this comment.
Value of line-height for items in project find results is equal to 2em. That's why we need to keep this multiplier when increasing/decreasing font size.
dawidowoc
commented
May 9, 2021
| children.push( | ||
| $.div( | ||
| { | ||
| className: "item-container", |
Author
There was a problem hiding this comment.
Needed for selection during test only.
dawidowoc
commented
May 9, 2021
| } | ||
|
|
||
| .list-tree.has-collapsable-children .list-nested-item > .list-item::before { | ||
| vertical-align: middle; |
Author
There was a problem hiding this comment.
It's related to that arrow icon showing that you can expand a nested item. We want them to keep it in the middle (vertically) at all times when you change the font size.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements
Description of the Change
Add possibility to change font size in project find results view. The font size is connected to editor.fontSize property. It can be changed by using window:increase-font-size, window:decrease-font-size, window:reset-font-size commands, similarly as you can do for editor view.
Video presenting the feature: https://youtu.be/fqGRfRE3b6M
Alternate Designs
I don't see any alternate designs.
Benefits
Possibility to change font size in project find results view.
Possible Drawbacks
I don't see any.
Applicable Issues
atom/atom#21125