Before

…lines 1–1104 unchanged (1104 lines)
1105 }
1106 }
1107 }
1108 }
1109
1110 _setPanelBoxStyle(disable) {
1111 let style = ''
1112
1113 if (!disable) {
1114 let topBottomMargins = SETTINGS.get_int('panel-top-bottom-margins')
1115 let sideMargins = SETTINGS.get_int('panel-side-margins')
1116
1117 style = `padding: ${this.geom.topOffset + topBottomMargins}px ${sideMargins}px ${topBottomMargins}px;`
1118 }
1119
1120 this.panelBox.set_style(style)
1121 }
1122
1123 _maybeSetDockCss(disable) {
1124 this.remove_style_class_name('dock')
1125
1126 if (!disable && this.geom.dockMode) this.add_style_class_name('dock')
…lines 1127–1633 unchanged (507 lines)

After

…lines 1–1104 unchanged (1104 lines)
1105 }
1106 }
1107 }
1108 }
1109
1110 _setPanelBoxStyle(disable) {
1111 this.panelBox.set_style('')
1112
1113 if (!disable) {
1114 let topBottomMargins = SETTINGS.get_int('panel-top-bottom-margins')
1115 let sideMargins = SETTINGS.get_int('panel-side-margins')
1116 let panelBoxTheme = this.panelBox.get_theme_node()
1117 let getPadding = (side) => panelBoxTheme.get_padding(side)
1118
1119 // add existing theme padding to dtp panel margins
1120 this.panelBox.set_style(
1121 `padding:
1122 ${this.geom.topOffset + topBottomMargins + getPadding(St.Side.TOP)}px
1123 ${sideMargins + getPadding(St.Side.RIGHT)}px
1124 ${topBottomMargins + getPadding(St.Side.BOTTOM)}px
1125 ${sideMargins + getPadding(St.Side.LEFT)}px;`,
1126 )
1127 }
1128 }
1129
1130 _maybeSetDockCss(disable) {
1131 this.remove_style_class_name('dock')
1132
1133 if (!disable && this.geom.dockMode) this.add_style_class_name('dock')
1134 }
…lines 1135–1640 unchanged (506 lines)

Before

program
comment "/*\n * This file is part of the Dash-To-Panel extension for G"...
import_statement
import "import"
import_clause
identifier "Clutter"
from "from"
string
' "'"
string_fragment "gi://Clutter"
' "'"
import_statement
import "import"
import_clause
identifier "GLib"
from "from"
string
' "'"
string_fragment "gi://GLib"
' "'"
import_statement
import "import"
import_clause
identifier "GObject"
from "from"
string
' "'"
string_fragment "gi://GObject"
' "'"
import_statement
import "import"
import_clause
identifier "Graphene"
from "from"
string
' "'"
string_fragment "gi://Graphene"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "AppIcons"
from "from"
string
' "'"
string_fragment "./appIcons.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Utils"
from "from"
string
' "'"
string_fragment "./utils.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Taskbar"
from "from"
string
' "'"
string_fragment "./taskbar.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "TaskbarItemContainer"
from "from"
string
' "'"
string_fragment "./taskbar.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Pos"
from "from"
string
' "'"
string_fragment "./panelPositions.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "PanelSettings"
from "from"
string
' "'"
string_fragment "./panelSettings.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "PanelStyle"
from "from"
string
' "'"
string_fragment "./panelStyle.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Config"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/misc/config.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Main"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/main.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Dash"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/dash.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "DND"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/dnd.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "CtrlAltTab"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/ctrlAltTab.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "PanelMenu"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/panelMenu.js"
' "'"
import_statement
import "import"
import_clause
identifier "St"
from "from"
string
' "'"
string_fragment "gi://St"
' "'"
import_statement
import "import"
import_clause
identifier "Meta"
from "from"
string
' "'"
string_fragment "gi://Meta"
' "'"
import_statement
import "import"
import_clause
identifier "Pango"
from "from"
string
' "'"
string_fragment "gi://Pango"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "PopupMenu"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/popupMenu.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "DateMenu"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/dateMenu.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Volume"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/status/volume.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Intellihide"
from "from"
string
' "'"
string_fragment "./intellihide.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Transparency"
from "from"
string
' "'"
string_fragment "./transparency.js"
' "'"
import_statement (+23 nodes collapsed)
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "gettext"
as "as"
identifier "_"
, ","
import_specifier
identifier "InjectionManager"
, ","
} "}"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/extensions/extension.js"
' "'"
export_statement (+24 nodes collapsed)
comment "//timeout names"
lexical_declaration
const "const"
variable_declarator
identifier "T4"
= "="
string
' "'"
string_fragment "showDesktopTimeout"
' "'"
lexical_declaration
const "const"
variable_declarator
identifier "T5"
= "="
string
' "'"
string_fragment "trackerFocusAppTimeout"
' "'"
lexical_declaration
const "const"
variable_declarator
identifier "T6"
= "="
string
' "'"
string_fragment "scrollPanelDelayTimeout"
' "'"
lexical_declaration
const "const"
variable_declarator
identifier "T7"
= "="
string
' "'"
string_fragment "waitPanelBoxAllocation"
' "'"
lexical_declaration
const "const"
variable_declarator
identifier "MIN_PANEL_SIZE"
= "="
number "22"
export_statement
export "export"
lexical_declaration
const "const"
variable_declarator
identifier "GS_PANEL_SIZE"
= "="
number "32"
export_statement
export "export"
lexical_declaration
const "const"
variable_declarator
identifier "Panel"
= "="
call_expression
member_expression
identifier "GObject"
. "."
property_identifier "registerClass"
arguments
( "("
object
{ "{"
} "}"
, ","
class
class "class"
identifier "Panel"
class_heritage
extends "extends"
member_expression
identifier "St"
. "."
property_identifier "Widget"
class_body
{ "{"
method_definition (+1271 nodes collapsed)
method_definition (+1165 nodes collapsed)
method_definition (+821 nodes collapsed)
method_definition (+73 nodes collapsed)
method_definition (+116 nodes collapsed)
method_definition
property_identifier "checkIfVertical"
formal_parameters
( "("
) ")"
statement_block
{ "{"
return_statement
return "return"
member_expression
member_expression
this "this"
. "."
property_identifier "geom"
. "."
property_identifier "vertical"
} "}"
method_definition (+28 nodes collapsed)
method_definition (+65 nodes collapsed)
method_definition (+439 nodes collapsed)
method_definition (+279 nodes collapsed)
method_definition (+98 nodes collapsed)
method_definition (+137 nodes collapsed)
method_definition (+80 nodes collapsed)
method_definition (+117 nodes collapsed)
method_definition (+149 nodes collapsed)
method_definition (+1251 nodes collapsed)
method_definition (+248 nodes collapsed)
method_definition (+22 nodes collapsed)
method_definition (+1934 nodes collapsed)
method_definition
property_identifier "_setPanelBoxStyle"
formal_parameters
( "("
identifier "disable"
) ")"
statement_block
{ "{"
lexical_declaration
let "let"
variable_declarator
identifier "style"
= "="
string
' "'"
' "'"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
identifier "disable"
) ")"
statement_block
{ "{"
lexical_declaration
let "let"
variable_declarator
identifier "topBottomMargins"
= "="
call_expression
member_expression
identifier "SETTINGS"
. "."
property_identifier "get_int"
arguments
( "("
string
' "'"
string_fragment "panel-top-bottom-margins"
' "'"
) ")"
lexical_declaration
let "let"
variable_declarator
identifier "sideMargins"
= "="
call_expression
member_expression
identifier "SETTINGS"
. "."
property_identifier "get_int"
arguments
( "("
string
' "'"
string_fragment "panel-side-margins"
' "'"
) ")"
expression_statement
assignment_expression
identifier "style"
= "="
template_string
` "`"
string_fragment "padding: "
template_substitution
${ "${"
binary_expression
member_expression
member_expression
this "this"
. "."
property_identifier "geom"
. "."
property_identifier "topOffset"
+ "+"
identifier "topBottomMargins"
} "}"
string_fragment "px "
template_substitution
${ "${"
identifier "sideMargins"
} "}"
string_fragment "px "
template_substitution
${ "${"
identifier "topBottomMargins"
} "}"
string_fragment "px;"
` "`"
} "}"
expression_statement
call_expression
member_expression
member_expression
this "this"
. "."
property_identifier "panelBox"
. "."
property_identifier "set_style"
arguments
( "("
identifier "style"
) ")"
} "}"
method_definition (+52 nodes collapsed)
method_definition (+291 nodes collapsed)
method_definition (+88 nodes collapsed)
method_definition (+437 nodes collapsed)
method_definition (+179 nodes collapsed)
method_definition (+36 nodes collapsed)
method_definition (+47 nodes collapsed)
method_definition (+455 nodes collapsed)
method_definition (+75 nodes collapsed)
method_definition (+495 nodes collapsed)
method_definition (+540 nodes collapsed)
method_definition (+47 nodes collapsed)
method_definition (+191 nodes collapsed)
comment "// _getBackgroundBrightness: return true if panel has a brig"...
method_definition (+26 nodes collapsed)
method_definition (+128 nodes collapsed)
method_definition (+373 nodes collapsed)
method_definition (+583 nodes collapsed)
method_definition (+57 nodes collapsed)
} "}"
, ","
) ")"
export_statement (+70 nodes collapsed)

After

program
comment "/*\n * This file is part of the Dash-To-Panel extension for G"...
import_statement
import "import"
import_clause
identifier "Clutter"
from "from"
string
' "'"
string_fragment "gi://Clutter"
' "'"
import_statement
import "import"
import_clause
identifier "GLib"
from "from"
string
' "'"
string_fragment "gi://GLib"
' "'"
import_statement
import "import"
import_clause
identifier "GObject"
from "from"
string
' "'"
string_fragment "gi://GObject"
' "'"
import_statement
import "import"
import_clause
identifier "Graphene"
from "from"
string
' "'"
string_fragment "gi://Graphene"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "AppIcons"
from "from"
string
' "'"
string_fragment "./appIcons.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Utils"
from "from"
string
' "'"
string_fragment "./utils.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Taskbar"
from "from"
string
' "'"
string_fragment "./taskbar.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "TaskbarItemContainer"
from "from"
string
' "'"
string_fragment "./taskbar.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Pos"
from "from"
string
' "'"
string_fragment "./panelPositions.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "PanelSettings"
from "from"
string
' "'"
string_fragment "./panelSettings.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "PanelStyle"
from "from"
string
' "'"
string_fragment "./panelStyle.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Config"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/misc/config.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Main"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/main.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Dash"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/dash.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "DND"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/dnd.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "CtrlAltTab"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/ctrlAltTab.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "PanelMenu"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/panelMenu.js"
' "'"
import_statement
import "import"
import_clause
identifier "St"
from "from"
string
' "'"
string_fragment "gi://St"
' "'"
import_statement
import "import"
import_clause
identifier "Meta"
from "from"
string
' "'"
string_fragment "gi://Meta"
' "'"
import_statement
import "import"
import_clause
identifier "Pango"
from "from"
string
' "'"
string_fragment "gi://Pango"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "PopupMenu"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/popupMenu.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "DateMenu"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/dateMenu.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Volume"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/ui/status/volume.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Intellihide"
from "from"
string
' "'"
string_fragment "./intellihide.js"
' "'"
import_statement
import "import"
import_clause
namespace_import
* "*"
as "as"
identifier "Transparency"
from "from"
string
' "'"
string_fragment "./transparency.js"
' "'"
import_statement (+23 nodes collapsed)
import_statement
import "import"
import_clause
named_imports
{ "{"
import_specifier
identifier "gettext"
as "as"
identifier "_"
, ","
import_specifier
identifier "InjectionManager"
, ","
} "}"
from "from"
string
' "'"
string_fragment "resource:///org/gnome/shell/extensions/extension.js"
' "'"
export_statement (+24 nodes collapsed)
comment "//timeout names"
lexical_declaration
const "const"
variable_declarator
identifier "T4"
= "="
string
' "'"
string_fragment "showDesktopTimeout"
' "'"
lexical_declaration
const "const"
variable_declarator
identifier "T5"
= "="
string
' "'"
string_fragment "trackerFocusAppTimeout"
' "'"
lexical_declaration
const "const"
variable_declarator
identifier "T6"
= "="
string
' "'"
string_fragment "scrollPanelDelayTimeout"
' "'"
lexical_declaration
const "const"
variable_declarator
identifier "T7"
= "="
string
' "'"
string_fragment "waitPanelBoxAllocation"
' "'"
lexical_declaration
const "const"
variable_declarator
identifier "MIN_PANEL_SIZE"
= "="
number "22"
export_statement
export "export"
lexical_declaration
const "const"
variable_declarator
identifier "GS_PANEL_SIZE"
= "="
number "32"
export_statement
export "export"
lexical_declaration
const "const"
variable_declarator
identifier "Panel"
= "="
call_expression
member_expression
identifier "GObject"
. "."
property_identifier "registerClass"
arguments
( "("
object
{ "{"
} "}"
, ","
class
class "class"
identifier "Panel"
class_heritage
extends "extends"
member_expression
identifier "St"
. "."
property_identifier "Widget"
class_body
{ "{"
method_definition (+1271 nodes collapsed)
method_definition (+1165 nodes collapsed)
method_definition (+821 nodes collapsed)
method_definition (+73 nodes collapsed)
method_definition (+116 nodes collapsed)
method_definition
property_identifier "checkIfVertical"
formal_parameters
( "("
) ")"
statement_block
{ "{"
return_statement
return "return"
member_expression
member_expression
this "this"
. "."
property_identifier "geom"
. "."
property_identifier "vertical"
} "}"
method_definition (+28 nodes collapsed)
method_definition (+65 nodes collapsed)
method_definition (+439 nodes collapsed)
method_definition (+279 nodes collapsed)
method_definition (+98 nodes collapsed)
method_definition (+137 nodes collapsed)
method_definition (+80 nodes collapsed)
method_definition (+117 nodes collapsed)
method_definition (+149 nodes collapsed)
method_definition (+1251 nodes collapsed)
method_definition (+248 nodes collapsed)
method_definition (+22 nodes collapsed)
method_definition (+1934 nodes collapsed)
method_definition
property_identifier "_setPanelBoxStyle"
formal_parameters
( "("
identifier "disable"
) ")"
statement_block
{ "{"
expression_statement
call_expression
member_expression
member_expression
this "this"
. "."
property_identifier "panelBox"
. "."
property_identifier "set_style"
arguments
( "("
string
' "'"
' "'"
) ")"
if_statement
if "if"
parenthesized_expression
( "("
unary_expression
! "!"
identifier "disable"
) ")"
statement_block
{ "{"
lexical_declaration
let "let"
variable_declarator
identifier "topBottomMargins"
= "="
call_expression
member_expression
identifier "SETTINGS"
. "."
property_identifier "get_int"
arguments
( "("
string
' "'"
string_fragment "panel-top-bottom-margins"
' "'"
) ")"
lexical_declaration
let "let"
variable_declarator
identifier "sideMargins"
= "="
call_expression
member_expression
identifier "SETTINGS"
. "."
property_identifier "get_int"
arguments
( "("
string
' "'"
string_fragment "panel-side-margins"
' "'"
) ")"
lexical_declaration
let "let"
variable_declarator
identifier "panelBoxTheme"
= "="
call_expression
member_expression
member_expression
this "this"
. "."
property_identifier "panelBox"
. "."
property_identifier "get_theme_node"
arguments
( "("
) ")"
lexical_declaration
let "let"
variable_declarator
identifier "getPadding"
= "="
arrow_function
formal_parameters
( "("
identifier "side"
) ")"
=> "=>"
call_expression
member_expression
identifier "panelBoxTheme"
. "."
property_identifier "get_padding"
arguments
( "("
identifier "side"
) ")"
comment "// add existing theme padding to dtp panel margins"
expression_statement
call_expression
member_expression
member_expression
this "this"
. "."
property_identifier "panelBox"
. "."
property_identifier "set_style"
arguments
( "("
template_string
` "`"
string_fragment "padding: \n "
template_substitution
${ "${"
binary_expression
binary_expression
member_expression
member_expression
this "this"
. "."
property_identifier "geom"
. "."
property_identifier "topOffset"
+ "+"
identifier "topBottomMargins"
+ "+"
call_expression
identifier "getPadding"
arguments
( "("
member_expression
member_expression
identifier "St"
. "."
property_identifier "Side"
. "."
property_identifier "TOP"
) ")"
} "}"
string_fragment "px \n "
template_substitution
${ "${"
binary_expression
identifier "sideMargins"
+ "+"
call_expression
identifier "getPadding"
arguments
( "("
member_expression
member_expression
identifier "St"
. "."
property_identifier "Side"
. "."
property_identifier "RIGHT"
) ")"
} "}"
string_fragment "px \n "
template_substitution
${ "${"
binary_expression
identifier "topBottomMargins"
+ "+"
call_expression
identifier "getPadding"
arguments
( "("
member_expression
member_expression
identifier "St"
. "."
property_identifier "Side"
. "."
property_identifier "BOTTOM"
) ")"
} "}"
string_fragment "px \n "
template_substitution
${ "${"
binary_expression
identifier "sideMargins"
+ "+"
call_expression
identifier "getPadding"
arguments
( "("
member_expression
member_expression
identifier "St"
. "."
property_identifier "Side"
. "."
property_identifier "LEFT"
) ")"
} "}"
string_fragment "px;"
` "`"
, ","
) ")"
} "}"
} "}"
method_definition (+52 nodes collapsed)
method_definition (+291 nodes collapsed)
method_definition (+88 nodes collapsed)
method_definition (+437 nodes collapsed)
method_definition (+179 nodes collapsed)
method_definition (+36 nodes collapsed)
method_definition (+47 nodes collapsed)
method_definition (+455 nodes collapsed)
method_definition (+75 nodes collapsed)
method_definition (+495 nodes collapsed)
method_definition (+540 nodes collapsed)
method_definition (+47 nodes collapsed)
method_definition (+191 nodes collapsed)
comment "// _getBackgroundBrightness: return true if panel has a brig"...
method_definition (+26 nodes collapsed)
method_definition (+128 nodes collapsed)
method_definition (+373 nodes collapsed)
method_definition (+583 nodes collapsed)
method_definition (+57 nodes collapsed)
} "}"
, ","
) ")"
export_statement (+70 nodes collapsed)