This is what I see.
1.jpg
This is what I see.
1.jpg
.... but you've recently changed it .....
"Today", top leftish, fits, but the following days don't, and it's repeated a few lines above anyway.Code:https://github.com/OpenViX/skins/commit/f85ce61ac6b15cd1dbb709f30fa17cc21a90882d
I've got "service width" set to the absolute minimum, to maximise the programme title widths.
Will the programme description be optional in the new version?
Last edited by ccs; 07-04-21 at 18:55.
Workaround (of sorts, with my settings): Set "Alignment of timeline date" to "left, wrapped", rather than using the default (the right hand attachment).
Last edited by ccs; 07-04-21 at 19:34.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
Or you could change the serviceWidth check in setEntries (in Components/EpgListGrid.py) since they appear to be wrong. Or at leats the logic is wrong. You really need to get each of the three possible date formats (starting with the longest) and stop once what you have fits within serviceWidth. The current code is juts a piece of guesswork, as you have no idea what font size is being used for the display.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
What you are suggesting would only be possible with a fixed width font.
Line 927 of Components/EpgListGrid.py looks like this
I've got Service width in the grid epg set to 225, and the date "Fri 9 Apr 2020" doesn't fit.Code:fnum = float(timeEpoch)/float(timeSteps) incWidth = int(eventRect.width() / fnum) timeStepsCalc = timeSteps * SECS_IN_MIN nowTime = localtime(time()) begTime = localtime(timeBase) serviceWidth = serviceRect.width() if nowTime.tm_year == begTime.tm_year and nowTime.tm_yday == begTime.tm_yday: datestr = _("Today") else: if serviceWidth > 179: dateFormat = config.usage.date.daylong.value elif serviceWidth > 129: dateFormat = config.usage.date.dayshort.value elif serviceWidth > 79: dateFormat = config.usage.date.daysmall.value else: dateFormat = "%a" datestr = strftime(dateFormat, begTime)
If I mess with EpgListGrid.py and force the date to be "Fri 9 Apr", it fits ok....
EDIT: If I make the Timeline font size small enough I should be able to see when the date format changes for different service widths.Code:fnum = float(timeEpoch)/float(timeSteps) incWidth = int(eventRect.width() / fnum) timeStepsCalc = timeSteps * SECS_IN_MIN nowTime = localtime(time()) begTime = localtime(timeBase) serviceWidth = serviceRect.width() if nowTime.tm_year == begTime.tm_year and nowTime.tm_yday == begTime.tm_yday: datestr = _("Today") else: if serviceWidth > 999: dateFormat = config.usage.date.daylong.value elif serviceWidth > 2: dateFormat = config.usage.date.dayshort.value elif serviceWidth > 1: dateFormat = config.usage.date.daysmall.value else: dateFormat = "%a" datestr = strftime(dateFormat, begTime)
Service width of 173 changes the date format (loses the year), Timeline font size -2.
Last edited by ccs; 08-04-21 at 11:11.
For my Service width of 225, Line 937 of EpgListGrid.py, when set to "if serviceWidth > 231:" works, ie. the year is dropped. Setting to 230, the year is back again.
Not really sure how that bit of code is supposed to work, as both the font size (mine is set to +5) and service width play a part.
MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD
I think birdman wonders if there is a some function you can ask "how wide will this string be in this font", or perhaps, if the renderer is not too advanced and doesn't adjust the widths to suit the neighbouring characters, just "how wide will this character be in this font".
It seems like something that might exist.
Last edited by BrokenUnusableAccount; 08-04-21 at 16:17. Reason: typo
birdman (08-04-21)
So as a starting point you need something like this:
Code:else: if serviceWidth > (self.timelineFontSize + self.epgConfig.timelinefs.value) * 9: dateFormat = config.usage.date.daylong.value elif serviceWidth > (self.timelineFontSize + self.epgConfig.timelinefs.value) * 6.5: dateFormat = config.usage.date.dayshort.value elif serviceWidth > (self.timelineFontSize + self.epgConfig.timelinefs.value) * 4: dateFormat = config.usage.date.daysmall.value
ccs (08-04-21)
.... Thanks, I'll have a go tomorrow.
Ok, now I have tried it I need to tweak a bit.
Don't forget some fonts are wider than others, so in skins with narrow fonts such as Magic FHD and iSkin it leaves a bit of extra space, but in all skins it seems to trim the year before it goes out of bounds.Code:else: if serviceWidth > (self.timelineFontSize + self.epgConfig.timelinefs.value) * 7.6: dateFormat = config.usage.date.daylong.value elif serviceWidth > (self.timelineFontSize + self.epgConfig.timelinefs.value) * 4.5: dateFormat = config.usage.date.dayshort.value elif serviceWidth > (self.timelineFontSize + self.epgConfig.timelinefs.value) * 2.85: dateFormat = config.usage.date.daysmall.value