Implement unique IDs and card linking

This commit is contained in:
GenevensiS
2025-08-11 16:17:13 +02:00
committed by GitHub
parent 13406b946c
commit 3bf9de18b1
100 changed files with 2432 additions and 1219 deletions
+2 -2
View File
@@ -78,7 +78,7 @@ private:
if (is_tag(text, tag_start, _( "<b"))) bold += 1;
else if (is_tag(text, tag_start, _("</b"))) bold -= 1;
else if (is_tag(text, tag_start, _( "<i"))) italic += 1;
else if (is_tag(text, tag_start, _("</i"))) italic -= 1;
else if (is_tag(text, tag_start, _("</i"))) italic -= 1;
else if (is_tag(text, tag_start, _("<u"))) underline += 1;
else if (is_tag(text, tag_start, _("</u"))) underline -= 1;
else if (is_tag(text, tag_start, _( "<sym"))) symbol += 1;
@@ -301,7 +301,7 @@ private:
(kwpph > 0 ? FONT_SOFT : FONT_NORMAL) |
(code > 0 ? FONT_CODE : FONT_NORMAL) |
(code_kw > 0 ? FONT_CODE_KW : FONT_NORMAL) |
(code_string > 0 ? FONT_CODE_STRING : FONT_NORMAL),
(code_string > 0 ? FONT_CODE_STRING : FONT_NORMAL),
underline > 0,
fonts.empty() ? nullptr : &fonts.back(),
param > 0 || param_ref > 0
+4 -3
View File
@@ -49,9 +49,10 @@ bool prepare_choice_viewer(RotatedDC& dc, ValueViewer& viewer, ChoiceStyle& styl
RealSize size;
img.generateCached(img_options, &style.mask, &combine, &bitmap, &image, &size);
// store content properties
if (style.content_width != size.width || style.content_height != size.height) {
style.content_width = size.width / dc.getZoom();
style.content_height = size.height / dc.getZoom();
double zoom = dc.getZoom();
if (style.content_width != size.width / zoom || style.content_height != size.height / zoom) {
style.content_width = size.width / zoom;
style.content_height = size.height / zoom;
return true;
}
}
+1 -1
View File
@@ -110,7 +110,7 @@ Bitmap ImageValueViewer::imagePlaceholder(const Rotation& rot, UInt w, UInt h, c
if (!default_image.Ok()) {
draw_checker(dc, rect);
}
else {
else {
if (default_image.HasAlpha()) bmp.UseAlpha(true);
dc.DrawImage(default_image, RealPoint(0,0));
}
+11 -11
View File
@@ -34,16 +34,16 @@ void InfoValueViewer::draw(RotatedDC& dc) {
style().padding_top,
-style().padding_left - style().padding_right,
-style().padding_top - style().padding_bottom
);
// for some reason, while inside the style tab, this value is empty
// so as a hack for now, if the value is empty, go fetch the caption instead
if (value().value.empty()) {
RealSize size = dc.GetTextExtent(field().caption.get());
dc.DrawText(field().caption.get(), align_in_rect(style().alignment, size, rect));
}
// this is what should happen
else {
RealSize size = dc.GetTextExtent(value().value);
dc.DrawText(value().value, align_in_rect(style().alignment, size, rect));
);
// for some reason, while inside the style tab, this value is empty
// so as a hack for now, if the value is empty, go fetch the caption instead
if (value().value.empty()) {
RealSize size = dc.GetTextExtent(field().caption.get());
dc.DrawText(field().caption.get(), align_in_rect(style().alignment, size, rect));
}
// this is what should happen
else {
RealSize size = dc.GetTextExtent(value().value);
dc.DrawText(value().value, align_in_rect(style().alignment, size, rect));
}
}