Code Monkey home page Code Monkey logo

Comments (9)

jens-maus avatar jens-maus commented on August 21, 2024 1

What exactly do you mean with "the space at the very bottom of the gadget". Can you please provide a detailed screenshot to outline what you exactly mean?

from texteditor.

jens-maus avatar jens-maus commented on August 21, 2024 1

Thanks for the screenshot. Of course I would vote for showing partial lines there as well as that would enable more smooth scrolling and use as much space as possible. And it would give people a hint that there is more to come.

from texteditor.

alpyre avatar alpyre commented on August 21, 2024

My ideas to resolve this issue are:
1) Smooth scroll always in doublebuffer mode and prevent gadget creation without a doublebuffering rastport.
...or...
2) Put coordinate checks into DrawSeparator(). Never let it draw out of window (or gadget) boundaries.
...OR...
3) We can compromise to this code while it would be a very rare occasion for a such small doublebuffer bitmap not to allocate and always use doublebuffer when smooth scrolling (or add another condition to DumpText() to switch to doublebuffer mode if it is printing the last line at the bottom - as it does for the top).

What would you suggest on this issue please?
@jens-maus @tboeckel

from texteditor.

alpyre avatar alpyre commented on August 21, 2024

Thinking through the weekend I now think the safest way to go is ideas 2 plus 3.
Doublebuffering bitmap is allocated in mShow() and deallocated in mHide() which are the best places to do them because we will have _mwidth() there.

from texteditor.

tboeckel avatar tboeckel commented on August 21, 2024

Better do this kind of stuff in MUIM_Setup/Cleanup instead of MUIM_Show/Hide. The latter will be called upon every window resize action, while the former is called when the window is opened/closed only.

from texteditor.

alpyre avatar alpyre commented on August 21, 2024

Yes, you're right. But actually it resizes the doublebuffering bitmap to the new size of the window. So I think it is smarter to keep it in Show/Hide.
Btw. I've made the changes to fix the bug already. We are safe now.

Now I want to ask something implementationally related to this.

What do you think about the space at the very bottom of the gadget? Should we make it print a partially visible line there?

For reference, in Windows' NotePad, it does not, but in Mousepad or Leafpad in Linux, it does.

What are your ideas on this?

from texteditor.

alpyre avatar alpyre commented on August 21, 2024

The space at the bottom when the gadget is sized to a height not proportional to the fontheight.
bottomspace

from texteditor.

alpyre avatar alpyre commented on August 21, 2024

I totally agree.

If we all agree on this behaviour, then I'm implementing the bug removal according to this and a pullrequest can happen within an hour.

@tboeckel

from texteditor.

alpyre avatar alpyre commented on August 21, 2024

I'm sorry guys. It turned out that I needed to change more than I expected in PrintLine(). But I'm pretty sure at most tomorrow I'll get it working. :)

from texteditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.