projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
647afe5
)
Cleanup: use a dcp::Size instead of a wxSize.
author
Carl Hetherington
<cth@carlh.net>
Mon, 19 Feb 2024 13:40:02 +0000
(14:40 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 19 Feb 2024 13:40:02 +0000
(14:40 +0100)
src/wx/simple_video_view.cc
patch
|
blob
|
history
diff --git
a/src/wx/simple_video_view.cc
b/src/wx/simple_video_view.cc
index 8524c1fe91f559f2b3d1c78a0fe923fee6e8546d..2a0575f2609f6e14077998607586ec4811292f12 100644
(file)
--- a/
src/wx/simple_video_view.cc
+++ b/
src/wx/simple_video_view.cc
@@
-75,7
+75,7
@@
SimpleVideoView::paint ()
auto scale = 1 / dpi_scale_factor (_panel);
dc.SetLogicalScale (scale, scale);
auto scale = 1 / dpi_scale_factor (_panel);
dc.SetLogicalScale (scale, scale);
- auto const panel_size =
_panel->GetSize (
);
+ auto const panel_size =
dcp::Size(_panel->GetSize().GetWidth(), _panel->GetSize().GetHeight()
);
auto pad = pad_colour();
dcp::Size out_size;
auto pad = pad_colour();
dcp::Size out_size;
@@
-88,32
+88,32
@@
SimpleVideoView::paint ()
out_size = _image->size();
wxImage frame (out_size.width, out_size.height, _image->data()[0], true);
wxBitmap frame_bitmap (frame);
out_size = _image->size();
wxImage frame (out_size.width, out_size.height, _image->data()[0], true);
wxBitmap frame_bitmap (frame);
- dc.DrawBitmap
(frame_bitmap, 0, max(0, (panel_size.GetHeight()
- out_size.height) / 2));
+ dc.DrawBitmap
(frame_bitmap, 0, max(0, (panel_size.height
- out_size.height) / 2));
}
}
- if (out_size.width < panel_size.
GetWidth()
) {
+ if (out_size.width < panel_size.
width
) {
wxPen p (pad);
wxBrush b (pad);
dc.SetPen (p);
dc.SetBrush (b);
wxPen p (pad);
wxBrush b (pad);
dc.SetPen (p);
dc.SetBrush (b);
- dc.DrawRectangle
(out_size.width, 0, panel_size.GetWidth() - out_size.width, panel_size.GetHeight()
);
+ dc.DrawRectangle
(out_size.width, 0, panel_size.width - out_size.width, panel_size.height
);
}
}
- if (out_size.height < panel_size.
GetHeight()
) {
+ if (out_size.height < panel_size.
height
) {
wxPen p (pad);
wxBrush b (pad);
dc.SetPen (p);
dc.SetBrush (b);
wxPen p (pad);
wxBrush b (pad);
dc.SetPen (p);
dc.SetBrush (b);
- int const gap = (panel_size.
GetHeight()
- out_size.height) / 2;
- dc.DrawRectangle
(0, 0, panel_size.GetWidth()
, gap);
- dc.DrawRectangle
(0, gap + out_size.height + 1, panel_size.GetWidth()
, gap + 1);
+ int const gap = (panel_size.
height
- out_size.height) / 2;
+ dc.DrawRectangle
(0, 0, panel_size.width
, gap);
+ dc.DrawRectangle
(0, gap + out_size.height + 1, panel_size.width
, gap + 1);
}
if (_viewer->outline_content()) {
wxPen p (outline_content_colour(), 2);
dc.SetPen (p);
dc.SetBrush (*wxTRANSPARENT_BRUSH);
}
if (_viewer->outline_content()) {
wxPen p (outline_content_colour(), 2);
dc.SetPen (p);
dc.SetBrush (*wxTRANSPARENT_BRUSH);
- dc.DrawRectangle
(_inter_position.x, _inter_position.y + (panel_size.GetHeight()
- out_size.height) / 2, _inter_size.width, _inter_size.height);
+ dc.DrawRectangle
(_inter_position.x, _inter_position.y + (panel_size.height
- out_size.height) / 2, _inter_size.width, _inter_size.height);
}
auto subs = _viewer->outline_subtitles();
}
auto subs = _viewer->outline_subtitles();