Skip to content

Commit

Permalink
Version R2.18a
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmonk committed Dec 22, 2024
1 parent 7da550c commit cf9470f
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 929 deletions.
2 changes: 1 addition & 1 deletion Resources/Styles/By default.qss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ QLabel[type="black"]
background-color: #000000;
color: #fafafa;
padding: 4px 4px 4px 4px;
border: 1px solid #d3d3d3;
border: 1px solid #000000;
}
QLabel[type="time_ms"]
{
Expand Down
25 changes: 8 additions & 17 deletions bin/Code/Databases/WDB_Summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,14 @@ def __init__(self, procesador, wb_database, db_games, siMoves=True):
self.grid.font_type(puntos=self.configuration.x_pgn_fontpoints)

# ToolBar
li_acciones = [
(_("Close"), Iconos.MainMenu(), wb_database.tw_terminar),
None,
(_("Basic position"), Iconos.Inicio(), self.start),
None,
(_("Previous"), Iconos.AnteriorF(), self.anterior),
(_("Next"), Iconos.SiguienteF(), self.siguiente),
None,
(_("Analyze"), Iconos.Analizar(), self.analizar),
None,
(_("Rebuild"), Iconos.Reindexar(), self.reindexar),
None,
(_("Config"), Iconos.Configurar(), self.config),
None,
]

self.tb = QTVarios.LCTB(self, li_acciones, icon_size=20, with_text=not self.siMoves)
self.tb = QTVarios.LCTB(self, icon_size=20, with_text=not self.siMoves)
self.tb.new(_("Close"), Iconos.MainMenu(), wb_database.tw_terminar)
self.tb.new(_("Basic position"), Iconos.Inicio(), self.start)
self.tb.new(_("Previous"), Iconos.AnteriorF(), self.anterior, sep=False)
self.tb.new(_("Next"), Iconos.SiguienteF(), self.siguiente)
self.tb.new(_("Analyze"), Iconos.Analizar(), self.analizar)
self.tb.new(_("Rebuild"), Iconos.Reindexar(), self.reindexar)
self.tb.new(_("Config"), Iconos.Configurar(), self.config)
if self.siMoves:
self.tb.vertical()

Expand Down
2 changes: 1 addition & 1 deletion bin/Code/MainWindow/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def save_video(self, dic_extended=None):
sps = self.informacionPGN.sp_sizes
if sps is None or sps[1] == 0:
dr = self.restore_dicvideo()
if key in dr:
if dr and key in dr:
dic[key] = dr[key]
continue
sps = [1, 1]
Expand Down
21 changes: 6 additions & 15 deletions bin/Code/MainWindow/WBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,29 +254,20 @@ def ponWhiteBlack(self, white, black):
o_columns.li_columns[1].head = white if white else _("White")
o_columns.li_columns[2].head = black if black else _("Black")

def reset_widths(self):
configuration = self.manager.configuration
width_pgn = configuration.x_pgn_width
n_ancho_labels = max(int((width_pgn - 3) // 2), 140)
self.lb_player_white.anchoFijo(n_ancho_labels)
self.lb_player_black.anchoFijo(n_ancho_labels)
self.lb_capt_white.anchoFijo(n_ancho_labels)
self.lb_capt_black.anchoFijo(n_ancho_labels)

def creaBloqueInformacion(self):
configuration = self.manager.configuration
width_pgn = configuration.x_pgn_width
with_each_color = (width_pgn - 52) // 2 - 10
n_ancho_labels = width_pgn // 2 + 2
width_each_color = (width_pgn - 52 - 25) // 2
n_ancho_labels = width_pgn // 2 - 4
# # Pgn
o_columns = Columnas.ListaColumnas()
o_columns.nueva("NUMBER", _("N."), 52, align_center=True)
with_figurines = configuration.x_pgn_withfigurines
o_columns.nueva(
"WHITE", _("White"), with_each_color, edicion=Delegados.EtiquetaPGN(True if with_figurines else None)
"WHITE", _("White"), width_each_color, edicion=Delegados.EtiquetaPGN(True if with_figurines else None)
)
o_columns.nueva(
"BLACK", _("Black"), with_each_color, edicion=Delegados.EtiquetaPGN(False if with_figurines else None)
"BLACK", _("Black"), width_each_color, edicion=Delegados.EtiquetaPGN(False if with_figurines else None)
)
self.pgn = Grid.Grid(self, o_columns, siCabeceraMovible=False, altoFila=configuration.x_pgn_rowheight)
self.pgn.setMinimumWidth(width_pgn)
Expand All @@ -294,15 +285,15 @@ def creaBloqueInformacion(self):
self.configuration.set_property(self.lb_player_black, "black")

# # Capturas
n_ancho_capt = n_ancho_labels - 12
n_ancho_capt = (width_pgn - 12) // 2
self.lb_capt_white = Controles.LB(self).anchoFijo(n_ancho_capt).set_wrap()
style = "QWidget { border-style: groove; border-width: 1px; border-color: LightGray; padding: 2px 0px 2px 0px;}"
self.lb_capt_white.setStyleSheet(style)

self.lb_capt_black = Controles.LB(self).anchoFijo(n_ancho_capt).set_wrap()
self.lb_capt_black.setStyleSheet(style)

self.bt_capt = (Controles.PB(self, self.captures_symbol(), self.captures_mouse_pressed).anchoFijo(12)
self.bt_capt = (Controles.PB(self, self.captures_symbol(), self.captures_mouse_pressed)
.set_font_type(puntos=16))

# Relojes
Expand Down
Loading

0 comments on commit cf9470f

Please sign in to comment.