1
0
Fork 0

Compare commits

...

4 Commits

Author SHA1 Message Date
Peter Nelson d7c06dfd32
Merge 642f4d0ab6 into baced00e9f 2025-07-13 04:47:25 +00:00
translators baced00e9f Update: Translations from eints
spanish (mexican): 1 change by absay
english (us): 1 change by 2TallTyler
galician: 10 changes by pvillaverde
dutch: 1 change by Afoklala
portuguese: 10 changes by jcteotonio
2025-07-13 04:45:12 +00:00
translators aaf5d39b15 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 1 change by WenSimEHRP
korean: 1 change by telk5093
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-07-11 04:45:38 +00:00
Richard Wheeler 7db135099a
Fix: Scale graph gridlines and axes with GUI scale (#12131) 2025-07-10 00:05:48 +01:00
15 changed files with 48 additions and 26 deletions

View File

@ -418,7 +418,9 @@ protected:
/* Draw the background of the graph itself. */
GfxFillRect(r.left, r.top, r.right, r.bottom, GRAPH_BASE_COLOUR);
/* Draw the vertical grid lines. */
/* Draw the grid lines. */
int gridline_width = WidgetDimensions::scaled.bevel.top;
int grid_colour = GRAPH_GRID_COLOUR;
/* Don't draw the first line, as that's where the axis will be. */
if (rtl) {
@ -428,13 +430,12 @@ protected:
x = r.left + x_sep;
}
int grid_colour = GRAPH_GRID_COLOUR;
for (int i = 1; i < this->num_vert_lines + 1; i++) {
/* If using wallclock units, we separate periods with a lighter line. */
if (TimerGameEconomy::UsingWallclockUnits()) {
grid_colour = (i % 4 == 0) ? GRAPH_YEAR_LINE_COLOUR : GRAPH_GRID_COLOUR;
}
GfxFillRect(x, r.top, x, r.bottom, grid_colour);
GfxFillRect(x, r.top, x + gridline_width - 1, r.bottom, grid_colour);
x += x_sep;
}
@ -443,20 +444,20 @@ protected:
for (int i = 0; i < (num_hori_lines + 1); i++) {
if (rtl) {
GfxFillRect(r.right + 1, y, r.right + ScaleGUITrad(3), y, GRAPH_AXIS_LINE_COLOUR);
GfxFillRect(r.right + 1, y, r.right + ScaleGUITrad(3), y + gridline_width - 1, GRAPH_AXIS_LINE_COLOUR);
} else {
GfxFillRect(r.left - ScaleGUITrad(3), y, r.left - 1, y, GRAPH_AXIS_LINE_COLOUR);
GfxFillRect(r.left - ScaleGUITrad(3), y, r.left - 1, y + gridline_width - 1, GRAPH_AXIS_LINE_COLOUR);
}
GfxFillRect(r.left, y, r.right, y, GRAPH_GRID_COLOUR);
GfxFillRect(r.left, y, r.right + gridline_width - 1, y + gridline_width - 1, GRAPH_GRID_COLOUR);
y -= y_sep;
}
/* Draw the y axis. */
GfxFillRect(r.left, r.top, r.left, r.bottom, GRAPH_AXIS_LINE_COLOUR);
GfxFillRect(r.left, r.top, r.left + gridline_width - 1, r.bottom + gridline_width - 1, GRAPH_AXIS_LINE_COLOUR);
/* Draw the x axis. */
y = x_axis_offset + r.top;
GfxFillRect(r.left, y, r.right, y, GRAPH_ZERO_LINE_COLOUR);
GfxFillRect(r.left, y, r.right + gridline_width - 1, y + gridline_width - 1, GRAPH_ZERO_LINE_COLOUR);
/* Find the largest value that will be drawn. */
if (this->num_on_x_axis == 0) return;
@ -511,7 +512,7 @@ protected:
year++;
/* Draw a lighter grid line between years. Top and bottom adjustments ensure we don't draw over top and bottom horizontal grid lines. */
GfxFillRect(x + x_sep, r.top + 1, x + x_sep, r.bottom - 1, GRAPH_YEAR_LINE_COLOUR);
GfxFillRect(x + x_sep, r.top + gridline_width, x + x_sep + gridline_width - 1, r.bottom - 1, GRAPH_YEAR_LINE_COLOUR);
}
x += x_sep;
}
@ -539,10 +540,11 @@ protected:
}
}
/* draw lines and dots */
uint linewidth = _settings_client.gui.graph_line_thickness;
uint pointoffs1 = (linewidth + 1) / 2;
uint pointoffs2 = linewidth + 1 - pointoffs1;
/* Draw lines and dots. */
uint linewidth = ScaleGUITrad(_settings_client.gui.graph_line_thickness);
uint pointwidth = ScaleGUITrad(_settings_client.gui.graph_line_thickness + 1);
uint pointoffs1 = pointwidth / 2;
uint pointoffs2 = pointwidth - pointoffs1;
auto draw_dataset = [&](const DataSet &dataset, uint8_t colour) {
if (HasBit(this->excluded_data, dataset.exclude_bit)) return;

View File

@ -268,6 +268,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}ano{
STR_UNITS_PERIODS :{NUM}{NBSP}período{P "" s}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Filtro:

View File

@ -267,6 +267,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}jaar
STR_UNITS_PERIODS :{NUM}{NBSP}period{P "" en}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Filter:

View File

@ -267,6 +267,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}year
STR_UNITS_PERIODS :{NUM}{NBSP}period{P "" s}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Filter:

View File

@ -267,6 +267,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}year
STR_UNITS_PERIODS :{NUM}{NBSP}period{P "" s}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Filter:

View File

@ -267,6 +267,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}vuo{
STR_UNITS_PERIODS :{NUM}{NBSP}jakso{P "" a}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :…
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Suodatin:

View File

@ -268,6 +268,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}ano{
STR_UNITS_PERIODS :{NUM}{NBSP}período{P "" s}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Filtrar:
@ -1302,6 +1303,9 @@ STR_CONFIG_SETTING_INTEREST_RATE_HELPTEXT :A taxa de inter
STR_CONFIG_SETTING_RUNNING_COSTS :Custos de explotación: {STRING}
STR_CONFIG_SETTING_RUNNING_COSTS_HELPTEXT :Establece o nivel de mantemento e custo de operación de vehículos e infraestrutura
###length 3
STR_CONFIG_SETTING_RUNNING_COSTS_LOW :Baixo
STR_CONFIG_SETTING_RUNNING_COSTS_MEDIUM :Medio
STR_CONFIG_SETTING_RUNNING_COSTS_HIGH :Alto
STR_CONFIG_SETTING_CONSTRUCTION_SPEED :Velocidade de construción: {STRING}
STR_CONFIG_SETTING_CONSTRUCTION_SPEED_HELPTEXT :Limita a cantidade de accións construtivas das IAs
@ -1324,6 +1328,9 @@ STR_CONFIG_SETTING_SUBSIDY_DURATION_DISABLED :Sen subvención
STR_CONFIG_SETTING_CONSTRUCTION_COSTS :Custos de construción: {STRING}
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HELPTEXT :Fixa o nivel de custos de construción e compra
###length 3
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_LOW :Baixo
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_MEDIUM :Medio
STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HIGH :Alto
STR_CONFIG_SETTING_RECESSIONS :Recesións económicas: {STRING}
STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :Se está activado, a economía pode entrar en recesión periódicamente. Durante unha recesión tódalas producións son significativamente máis baixas (volvendo ao nivel anterior cando a recesión remata)
@ -2079,9 +2086,9 @@ STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED_HELPTEXT :A clase de merc
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT :Xeito de distribución para outros tipos de mercadoría: {STRING}
STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT_HELPTEXT :"Asimétrico" significa que calquera cantidade de mercadorías pode ser enviada en calquera dirección. "Manual" significa que non haberá distribución automática para estas mercadorías
###length 3
STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :manual
STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :asimétrica
STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :simétrica
STR_CONFIG_SETTING_DISTRIBUTION_MANUAL :Manual
STR_CONFIG_SETTING_DISTRIBUTION_ASYMMETRIC :Asimétrica
STR_CONFIG_SETTING_DISTRIBUTION_SYMMETRIC :Simétrica
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY :Precisión da distribución: {STRING}
STR_CONFIG_SETTING_LINKGRAPH_ACCURACY_HELPTEXT :Canto máis alto sexa o valor, máis tempo de CPU levará o cálculo de distribución. Se leva demasiado tempo podes experimentar retraso. Se sen embargo o fixas nun valor baixo, a distribución será imprecisa, e pode que a carga non sexa enviada aos destinos que ti queres

View File

@ -329,6 +329,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}έτ
STR_UNITS_PERIODS :{NUM}{NBSP}περίοδ{P 0 ος οι}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Φιλτράρισμα λίστας:

View File

@ -268,6 +268,7 @@ STR_UNITS_YEARS :{NUM}년
STR_UNITS_PERIODS :{NUM}기간
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :…
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}검색:

View File

@ -646,6 +646,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}{P r
STR_UNITS_PERIODS :{NUM}{NBSP}okres{P "" y ów}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Filtr:

View File

@ -268,6 +268,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}ano{
STR_UNITS_PERIODS :{NUM}{NBSP}período{P "" s}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Filtro:
@ -738,7 +739,7 @@ STR_PLAYLIST_TOOLTIP_CLICK_TO_ADD_TRACK :{BLACK}Clique n
STR_PLAYLIST_TOOLTIP_CLICK_TO_REMOVE_TRACK :{BLACK}Clique numa faixa para a remover da lista (apenas Personalização 1 ou Personalização 2)
# Highscore window
STR_HIGHSCORE_TOP_COMPANIES :{BIG_FONT}{BLACK}Melhores empresas
STR_HIGHSCORE_TOP_COMPANIES :{BIG_FONT}{BLACK}As melhores empresas
STR_HIGHSCORE_POSITION :{BIG_FONT}{BLACK}{COMMA}.
STR_HIGHSCORE_PERFORMANCE_TITLE_BUSINESSMAN :Negociante
STR_HIGHSCORE_PERFORMANCE_TITLE_ENTREPRENEUR :Empresário
@ -748,7 +749,7 @@ STR_HIGHSCORE_PERFORMANCE_TITLE_MAGNATE :Magnata
STR_HIGHSCORE_PERFORMANCE_TITLE_MOGUL :Grande magnata
STR_HIGHSCORE_PERFORMANCE_TITLE_TYCOON_OF_THE_CENTURY :Magnata do século
STR_HIGHSCORE_NAME :{PRESIDENT_NAME}, {COMPANY}
STR_HIGHSCORE_STATS :{BIG_FONT}'{STRING}' ({COMMA})
STR_HIGHSCORE_STATS :{BIG_FONT}"{STRING}" ({COMMA})
STR_HIGHSCORE_COMPANY_ACHIEVES_STATUS :{BIG_FONT}{BLACK}{COMPANY} conquista o estatuto de '{STRING}'!
STR_HIGHSCORE_PRESIDENT_OF_COMPANY_ACHIEVES_STATUS :{BIG_FONT}{WHITE}{PRESIDENT_NAME} de {COMPANY} conquista o estatuto de '{STRING}'!
@ -3116,8 +3117,8 @@ STR_INDUSTRY_CARGOES_SELECT_INDUSTRY_TOOLTIP :{BLACK}Selecion
# Land area window
STR_LAND_AREA_INFORMATION_CAPTION :{WHITE}Informações do Terreno
STR_LAND_AREA_INFORMATION_LOCATION_TOOLTIP :{BLACK}Centrar visualização na localização do mosaico. Ctrl+Clique para abrir uma nova janela de visualização nesse mosaico.
STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A :{BLACK}Custo para limpar: {LTBLUE}N/D
STR_LAND_AREA_INFORMATION_COST_TO_CLEAR :{BLACK}Custo para limpar: {RED}{CURRENCY_LONG}
STR_LAND_AREA_INFORMATION_COST_TO_CLEAR_N_A :{BLACK}Custo de desobstrução: {LTBLUE}N/D
STR_LAND_AREA_INFORMATION_COST_TO_CLEAR :{BLACK}Custo de desobstrução: {RED}{CURRENCY_LONG}
STR_LAND_AREA_INFORMATION_REVENUE_WHEN_CLEARED :{BLACK}Receitas apuradas: {LTBLUE}{CURRENCY_LONG}
STR_LAND_AREA_INFORMATION_OWNER_N_A :N/D
STR_LAND_AREA_INFORMATION_OWNER :{BLACK}Proprietário: {LTBLUE}{STRING}
@ -3125,7 +3126,7 @@ STR_LAND_AREA_INFORMATION_ROAD_OWNER :{BLACK}Dono da
STR_LAND_AREA_INFORMATION_TRAM_OWNER :{BLACK}Dono da linha de eléctrico: {LTBLUE}{STRING}
STR_LAND_AREA_INFORMATION_RAIL_OWNER :{BLACK}Dono da linha férrea: {LTBLUE}{STRING}
STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY :{BLACK}Autoridade local: {LTBLUE}{STRING}
STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE :Nenhum
STR_LAND_AREA_INFORMATION_LOCAL_AUTHORITY_NONE :Nenhuma
STR_LAND_AREA_INFORMATION_LANDINFO_COORDS :{BLACK}Coordenadas: {LTBLUE}{NUM} x {NUM} x {NUM}
STR_LAND_AREA_INFORMATION_LANDINFO_INDEX :{BLACK}Índice do mosaico: {LTBLUE}{NUM} ({HEX})
STR_LAND_AREA_INFORMATION_BUILD_DATE :{BLACK}Construído/renovado: {LTBLUE}{DATE_LONG}
@ -3684,9 +3685,9 @@ STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER :{BLACK}No inver
STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_DELIVERED_GENERAL :{ORANGE}{STRING}{GREEN} fo{G 0 i i i ram ram} entregue{G 0 "" "" "" s s}
STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED :{ORANGE}{CARGO_TINY} / {CARGO_LONG}{RED} (ainda necessário)
STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_DELIVERED :{ORANGE}{CARGO_TINY} / {CARGO_LONG}{GREEN} (entregue)
STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}Localidade cresce a cada {ORANGE}{UNITS_DAYS_OR_SECONDS}
STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}Localidade cresce a cada {ORANGE}{UNITS_DAYS_OR_SECONDS} (financiada)
STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}Localidade {RED}não{BLACK} está a crescer
STR_TOWN_VIEW_TOWN_GROWS_EVERY :{BLACK}A localidade cresce a cada {ORANGE}{UNITS_DAYS_OR_SECONDS}
STR_TOWN_VIEW_TOWN_GROWS_EVERY_FUNDED :{BLACK}A localidade cresce a cada {ORANGE}{UNITS_DAYS_OR_SECONDS} (financiada)
STR_TOWN_VIEW_TOWN_GROW_STOPPED :{BLACK}A localidade {RED}não{BLACK} está a crescer
STR_TOWN_VIEW_NOISE_IN_TOWN :{BLACK}Limite de ruído na localidade: {ORANGE}{COMMA}{BLACK} máx: {ORANGE}{COMMA}
STR_TOWN_VIEW_CENTER_TOOLTIP :{BLACK}Centrar visualização na localização da localidade. Ctrl+Clique para abrir um novo visualizador na localização da localidade
STR_TOWN_VIEW_LOCAL_AUTHORITY_BUTTON :{BLACK}Autoridade Local
@ -3699,7 +3700,7 @@ STR_TOWN_VIEW_EXPAND_BUILDINGS_BUTTON :{BLACK}Expandir
STR_TOWN_VIEW_EXPAND_BUILDINGS_TOOLTIP :{BLACK}Aumentar os edifícios da localidade
STR_TOWN_VIEW_EXPAND_ROADS_BUTTON :{BLACK}Expandir estradas
STR_TOWN_VIEW_EXPAND_ROADS_TOOLTIP :{BLACK}Aumentar as estradas da localidade
STR_TOWN_VIEW_DELETE_BUTTON :{BLACK}Apagar
STR_TOWN_VIEW_DELETE_BUTTON :{BLACK}Remover
STR_TOWN_VIEW_DELETE_TOOLTIP :{BLACK}Remover completamente esta localidade
STR_TOWN_VIEW_RENAME_TOWN_BUTTON :Renomear Localidade
@ -3942,7 +3943,7 @@ STR_FINANCES_INFRASTRUCTURE_BUTTON :{BLACK}Infraest
STR_COMPANY_VIEW_CAPTION :{WHITE}{COMPANY} {BLACK}{COMPANY_NUM}
STR_COMPANY_VIEW_PRESIDENT_MANAGER_TITLE :{WHITE}{PRESIDENT_NAME}{}{GOLD}(Presidente)
STR_COMPANY_VIEW_INAUGURATED_TITLE :{GOLD}Inaugurado: {WHITE}{NUM}
STR_COMPANY_VIEW_INAUGURATED_TITLE :{GOLD}Inaugurada em: {WHITE}{NUM}
STR_COMPANY_VIEW_INAUGURATED_TITLE_WALLCLOCK :{GOLD}Inaugurada: {WHITE}{NUM} (período {NUM})
STR_COMPANY_VIEW_COLOUR_SCHEME_TITLE :{GOLD}Cores:
STR_COMPANY_VIEW_VEHICLES_TITLE :{GOLD}Veículos:

View File

@ -393,6 +393,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}{P
STR_UNITS_PERIODS :{NUM}{NBSP}цикл{P "" а ов}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Фильтр:

View File

@ -267,6 +267,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}年
STR_UNITS_PERIODS :{NUM}{NBSP}个周期
STR_LIST_SEPARATOR :、
STR_TRUNCATION_ELLIPSIS :…
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}搜索:

View File

@ -268,6 +268,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}año
STR_UNITS_PERIODS :{NUM}{NBSP}período{P "" s}
STR_LIST_SEPARATOR :,{SPACE}
STR_TRUNCATION_ELLIPSIS :...
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}Filtrar:

View File

@ -267,6 +267,7 @@ STR_UNITS_YEARS :{NUM}{NBSP}年
STR_UNITS_PERIODS :{NUM}{NBSP}個週期
STR_LIST_SEPARATOR :、
STR_TRUNCATION_ELLIPSIS :……
# Common window strings
STR_LIST_FILTER_TITLE :{BLACK}篩選: