Closed bigoulours closed 2 years ago
Single line change is fine but why is the fgcolor parameter being removed from the drawtext function here?
If I'm not mistaken the only time you set fgcolor actively is with value self.textcolor. Why not hardcoding it directly? Am I missing something? This should also work with different themes.
If you wish to keep fgcolor I'll gladly revert my changes to only keep single_line=True
and:
if single_line:
celltxt = celltxt.strip().split('\n', 1)[0]
Having it as a parameter allows the function to be re-used elsewhere with other colors but it isn't at the moment so doesn't probably matter.
It seems you planed to add text wrapping but the
warp
variable isn't used and cell height isn't set either. Since multi-line cells lead to messed up display, I suggest setting cells as single line until a better solution is developed. This doesn't affect the underlying df and editing via double click is still be possible.