-
Notifications
You must be signed in to change notification settings - Fork 195
Add font resizing in project search (#21125) #1153
base: master
Are you sure you want to change the base?
Add font resizing in project search (#21125) #1153
Conversation
5ddb65a
to
f300227
Compare
|
||
getHeightAdjustedToFontSize(baseHeight) { | ||
const lineHeight = 2; | ||
const baseFontSize = 12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
} | ||
|
||
getHeightAdjustedToFontSize(baseHeight) { | ||
const lineHeight = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -54,18 +70,20 @@ module.exports = class ListView { | |||
children.push( | |||
$.div( | |||
{ | |||
className: "item-container", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed for selection during test only.
@@ -374,3 +374,7 @@ atom-workspace.find-visible { | |||
} | |||
} | |||
} | |||
|
|||
.list-tree.has-collapsable-children .list-nested-item > .list-item::before { | |||
vertical-align: middle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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