MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / UpdateStyle

Method UpdateStyle

src/base_grid.cpp:167–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void BaseGrid::UpdateStyle() {
168 wxString fontname = FontFace("Subtitle/Grid");
169 if (fontname.empty()) fontname = "Tahoma";
170 font.SetFaceName(fontname);
171 font.SetPointSize(OPT_GET("Subtitle/Grid/Font Size")->GetInt());
172 font.SetWeight(wxFONTWEIGHT_NORMAL);
173
174 wxClientDC dc(this);
175 dc.SetFont(font);
176
177 // Set line height
178 lineHeight = dc.GetCharHeight() + 4;
179
180 // Set row brushes
181 row_colors.Default.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Background/Background")->GetColor()));
182 row_colors.Header.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Header")->GetColor()));
183 row_colors.Selection.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Background/Selection")->GetColor()));
184 row_colors.Comment.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Background/Comment")->GetColor()));
185 row_colors.Visible.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Background/Inframe")->GetColor()));
186 row_colors.SelectedComment.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Background/Selected Comment")->GetColor()));
187 row_colors.LeftCol.SetColour(to_wx(OPT_GET("Colour/Subtitle Grid/Left Column")->GetColor()));
188
189 SetColumnWidths();
190
191 AdjustScrollbar();
192 Refresh(false);
193}
194
195void BaseGrid::UpdateMaps() {
196 index_line_map.clear();

Callers

nothing calls this directly

Calls 5

FontFaceFunction · 0.85
SetFontMethod · 0.80
GetColorMethod · 0.80
to_wxFunction · 0.70
SetColourMethod · 0.45

Tested by

no test coverage detected