Make non visible views non opaque
Summary: On certain apps there are a lot of views that have zero size and this isnt clear from the tree view. This will help Reviewed By: lblasa Differential Revision: D47917167 fbshipit-source-id: 180ef1cf34c3735acfd54d3498db9d29f759d959
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1cf0527a51
commit
09042ec5d6
@@ -446,9 +446,12 @@ function TreeNodeRow({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function TreeNodeTextContent({treeNode}: {treeNode: TreeNode}) {
|
function TreeNodeTextContent({treeNode}: {treeNode: TreeNode}) {
|
||||||
|
const isZero = treeNode.bounds.width === 0 && treeNode.bounds.height === 0;
|
||||||
|
const invisible = treeNode.hiddenAttributes?.['invisible'] === true;
|
||||||
return (
|
return (
|
||||||
<Layout.Horizontal
|
<Layout.Horizontal
|
||||||
style={{
|
style={{
|
||||||
|
opacity: isZero || invisible ? 0.5 : 1,
|
||||||
alignItems: 'baseline',
|
alignItems: 'baseline',
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
}}>
|
}}>
|
||||||
|
|||||||
Reference in New Issue
Block a user