diff --git a/mythtv/libs/libmythtv/osd.cpp b/mythtv/libs/libmythtv/osd.cpp
index 557f7a7..e5e6817 100644
a
|
b
|
void OSD::ShowEditArrow(long long number |
2237 | 2237 | char name[128]; |
2238 | 2238 | sprintf(name, "%lld-%d", number, type); |
2239 | 2239 | |
2240 | | int xtmp = (int)((editarrowRect.width() * 1.0 / totalframes) * number); |
2241 | | int xpos = (int) round((editarrowRect.left() + xtmp) * wmult); |
| 2240 | int pos = number * 1000 / totalframes; |
| 2241 | int xtmp = (int)(round(editarrowRect.width() * wmult) / 1000.0 * pos); |
| 2242 | int xpos = xtmp + (int)(editarrowRect.left() * wmult); |
2242 | 2243 | int ypos = (int) round(editarrowRect.top() * hmult); |
2243 | 2244 | |
2244 | 2245 | osdlock.lock(); |
2245 | 2246 | |
2246 | 2247 | OSDSet *set = new OSDSet(name, false, |
2247 | 2248 | osdBounds.width(), osdBounds.height(), |
2248 | | wmult, hmult, frameint); |
| 2249 | wmult, hmult, frameint, xoffset, yoffset); |
2249 | 2250 | set->SetAllowFade(false); |
2250 | 2251 | OSDSet *container = GetSet("editmode"); |
2251 | 2252 | if (container) |
… |
… |
void OSD::ShowEditArrow(long long number |
2257 | 2258 | |
2258 | 2259 | OSDTypeImage *image; |
2259 | 2260 | if (type == 0) |
2260 | | { |
2261 | 2261 | image = new OSDTypeImage(*editarrowleft); |
2262 | | xpos -= image->ImageSize().width(); |
2263 | | } |
2264 | 2262 | else |
2265 | | { |
2266 | 2263 | image = new OSDTypeImage(*editarrowright); |
2267 | | } |
| 2264 | |
| 2265 | // FIXME: image is only after Reinit() correctly scaled |
| 2266 | image->Reinit(wmult, hmult); |
| 2267 | |
| 2268 | xpos -= image->ImageSize().width()/2; |
2268 | 2269 | |
2269 | 2270 | image->SetPosition(QPoint(xpos, ypos), wmult, hmult); |
2270 | 2271 | |
diff --git a/mythtv/libs/libmythtv/osdtypes.cpp b/mythtv/libs/libmythtv/osdtypes.cpp
index 8838212..f53357d 100644
a
|
b
|
using namespace std; |
19 | 19 | /// Shared OSD image cache |
20 | 20 | OSDImageCache OSDTypeImage::c_cache; |
21 | 21 | |
22 | | OSDSet::OSDSet(const QString &name, bool cache, int screenwidth, |
23 | | int screenheight, float wmult, float hmult, int frint) |
| 22 | |
| 23 | OSDSet::OSDSet(const QString &name, bool cache, int screenwidth, |
| 24 | int screenheight, float wmult, float hmult, |
| 25 | int frint, int xoff, int yoff) |
24 | 26 | : QObject() |
25 | 27 | { |
26 | 28 | m_wantsupdates = false; |
… |
… |
OSDSet::OSDSet(const QString &name, bool |
43 | 45 | m_screenheight = screenheight; |
44 | 46 | m_wmult = wmult; |
45 | 47 | m_hmult = hmult; |
46 | | m_xoffsetbase = 0; |
47 | | m_yoffsetbase = 0; |
| 48 | m_xoffsetbase = xoff; |
| 49 | m_yoffsetbase = yoff; |
48 | 50 | |
49 | 51 | m_notimeout = false; |
50 | 52 | m_fadetime = -1; |
diff --git a/mythtv/libs/libmythtv/osdtypes.h b/mythtv/libs/libmythtv/osdtypes.h
index 9f63fc5..fcaea88 100644
a
|
b
|
class OSDSet : public QObject |
44 | 44 | { |
45 | 45 | Q_OBJECT |
46 | 46 | public: |
47 | | OSDSet(const QString &name, bool cache, int screenwidth, int screenheight, |
48 | | float wmult, float hmult, int frint); |
| 47 | OSDSet(const QString &name, bool cache, int screenwidth, int screenheight, |
| 48 | float wmult, float hmult, int frint, int xoff=0, int yoff=0); |
49 | 49 | OSDSet(const OSDSet &other); |
50 | 50 | ~OSDSet(); |
51 | 51 | |