| 165 | } |
| 166 | |
| 167 | void 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 | |
| 195 | void BaseGrid::UpdateMaps() { |
| 196 | index_line_map.clear(); |