tests/mockblackbox.py
author Anton Shestakov <av6@dwimlabs.net>
Wed, 14 Oct 2015 22:24:50 +0800
changeset 26667 721274cef774
parent 24705 0ead0a07ed9c
child 28028 ac49ecb2a897
permissions -rw-r--r--
monoblue: make the size of line links bigger to cover line numbers better Due to how the line numbers in monoblue are formed (via css counters), the size of the area with the numbers and the size of the actually clickable links are not tied together well enough. Before this patch, there were noticeable "gaps" between line links - clicking on the bottom part of a visible line number did nothing as opposed to selecting this line. Let's set font-size for everything in pre.sourcelines so that it also affects the links and then add a bit of padding to them so compensate for layout differences. This way the sizes are still not 100% the same, but should be very close.

from mercurial import util

def makedate():
    return 0, 0
def getuser():
    return 'bob'

# mock the date and user apis so the output is always the same
def uisetup(ui):
    util.makedate = makedate
    util.getuser = getuser