@@ -130,12 +130,13 @@ class Palettes {
130130 td . width = 1.5 * this . cellSize ;
131131 td . height = 1.5 * this . cellSize ;
132132 td . style . position = "relative" ;
133+ td . style . backgroundColor = platformColor . paletteBackground ;
133134 td . appendChild (
134135 makePaletteIcons (
135136 PALETTEICONS [ MULTIPALETTEICONS [ i ] ]
136- . replace ( "background_fill_color" , platformColor . selectorBackground )
137- . replace ( / s t r o k e _ c o l o r / g, platformColor . ruleColor )
138- . replace ( / f i l l _ c o l o r / g, platformColor . background ) ,
137+ . replace ( "background_fill_color" , platformColor . paletteLabelBackground )
138+ . replace ( / s t r o k e _ c o l o r / g, platformColor . strokeColor )
139+ . replace ( / f i l l _ c o l o r / g, platformColor . fillColor ) ,
139140 1.5 * this . cellSize ,
140141 1.5 * this . cellSize
141142 )
@@ -146,7 +147,7 @@ class Palettes {
146147 cover . style . top = "0" ;
147148 cover . style . width = "100%" ;
148149 cover . style . height = "1px" ;
149- cover . style . background = platformColor . selectorBackground ;
150+ cover . style . background = platformColor . paletteLabelBackground ;
150151 td . appendChild ( cover ) ;
151152 td . onmouseover = ( ) => {
152153 this . showSelection ( i , tr ) ;
@@ -161,23 +162,23 @@ class Palettes {
161162 if ( j === i ) {
162163 img = makePaletteIcons (
163164 PALETTEICONS [ MULTIPALETTEICONS [ j ] ]
164- . replace ( "background_fill_color" , platformColor . selectorSelected )
165- . replace ( / s t r o k e _ c o l o r / g, platformColor . ruleColor )
166- . replace ( / f i l l _ c o l o r / g, platformColor . background ) ,
165+ . replace ( "background_fill_color" , platformColor . paletteLabelSelected )
166+ . replace ( / s t r o k e _ c o l o r / g, platformColor . strokeColor )
167+ . replace ( / f i l l _ c o l o r / g, platformColor . fillColor ) ,
167168 this . cellSize ,
168169 this . cellSize
169170 ) ;
170- tr . children [ j ] . children [ 1 ] . style . background = platformColor . selectorSelected ;
171+ tr . children [ j ] . children [ 1 ] . style . background = platformColor . paletteLabelSelected ;
171172 } else {
172173 img = makePaletteIcons (
173174 PALETTEICONS [ MULTIPALETTEICONS [ j ] ]
174- . replace ( "background_fill_color" , platformColor . selectorBackground )
175- . replace ( / s t r o k e _ c o l o r / g, platformColor . ruleColor )
176- . replace ( / f i l l _ c o l o r / g, platformColor . background ) ,
175+ . replace ( "background_fill_color" , platformColor . paletteLabelBackground )
176+ . replace ( / s t r o k e _ c o l o r / g, platformColor . strokeColor )
177+ . replace ( / f i l l _ c o l o r / g, platformColor . fillColor ) ,
177178 this . cellSize ,
178179 this . cellSize
179180 ) ;
180- tr . children [ j ] . children [ 1 ] . style . background = platformColor . selectorBackground ;
181+ tr . children [ j ] . children [ 1 ] . style . background = platformColor . paletteLabelBackground ;
181182 }
182183 tr . children [ j ] . children [ 0 ] . src = img . src ;
183184 }
@@ -283,7 +284,7 @@ class Palettes {
283284 ) ;
284285 }
285286 }
286-
287+
287288 makeSearchButton ( name , icon , listBody ) {
288289 const row = listBody . insertRow ( - 1 ) ;
289290 const img = row . insertCell ( - 1 ) ;
@@ -302,6 +303,7 @@ class Palettes {
302303 row . style . flexDirection = "row" ;
303304 row . style . alignItems = "center" ;
304305 row . style . width = "126px" ;
306+ row . style . backgroundColor = platformColor . paletteBackground ;
305307
306308 this . _loadPaletteButtonHandler ( name , row ) ;
307309 }
@@ -323,6 +325,13 @@ class Palettes {
323325 row . style . flexDirection = "row" ;
324326 row . style . alignItems = "center" ;
325327 row . style . width = "126px" ;
328+ row . style . backgroundColor = platformColor . paletteBackground ;
329+ row . addEventListener ( 'mouseover' , ( ) => {
330+ row . style . backgroundColor = platformColor . hoverColor ;
331+ } ) ;
332+ row . addEventListener ( 'mouseout' , ( ) => {
333+ row . style . backgroundColor = platformColor . paletteBackground ;
334+ } ) ;
326335
327336 this . _loadPaletteButtonHandler ( name , row ) ;
328337 }
@@ -426,7 +435,7 @@ class Palettes {
426435 'px"bgcolor="white"><thead><tr><td style= "width:28px"></tr></thead><tbody></tbody></table></div>' ;
427436 element . childNodes [ 0 ] . style . border = `1px solid ${ platformColor . selectorSelected } ` ;
428437 document . body . appendChild ( element ) ;
429-
438+
430439 } catch ( e ) {
431440 console . error ( 'Error clearing palettes:' , e ) ;
432441 }
@@ -457,9 +466,9 @@ class Palettes {
457466 timeout = setTimeout ( ( ) => this . showPalette ( name ) , 400 ) ;
458467 }
459468 } ;
460-
469+
461470 row . onmouseout = ( ) => clearTimeout ( timeout ) ;
462-
471+
463472 // eslint-disable-next-line no-unused-vars
464473 row . onclick = ( event ) => {
465474 if ( name == "search" ) {
@@ -881,7 +890,7 @@ class Palette {
881890 if ( createHeader ) {
882891 let header = this . menuContainer . children [ 0 ] ;
883892 header = header . insertRow ( ) ;
884- header . style . background = platformColor . selectorSelected ;
893+ header . style . backgroundColor = platformColor . paletteLabelBackground ;
885894 header . innerHTML =
886895 '<td style ="width: 100%; height: 42px; box-sizing: border-box; display: flex; flex-direction: row; align-items: center; justify-content: space-between;"></td>' ;
887896 header = header . children [ 0 ] ;
@@ -900,7 +909,7 @@ class Palette {
900909 const label = document . createElement ( "span" ) ;
901910 label . textContent = toTitleCase ( _ ( this . name ) ) ;
902911 label . style . fontWeight = "bold" ;
903- label . style . color = platformColor . paletteBackground ;
912+ label . style . color = platformColor . textColor ;
904913 header . appendChild ( label ) ;
905914
906915 const closeDownImg = document . createElement ( "span" ) ;
0 commit comments