Coder Social home page Coder Social logo

onbloc's People

Contributors

plantec avatar tinchodias avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

onbloc's Issues

Scrollbar thumb changing extent can look weird

text := String streamContents: [ :stream |
	(1 to: 15) reverseDo: [ :index |
		10*index timesRepeat: [ 
			stream nextPutAll: 'abcde ' ].
		stream cr;cr. ] ].
text := text asRopedText.

ed := AlbEditorElement new.
ed text: text.
ed withRowNumbers; withoutCacheLimit.
vscrollBar := OBlVerticalScrollbarElement new.
vscrollBar constraintsDo: [ :c |
	c ignoreByLayout.
	c ignored horizontal alignRight ].
vscrollBar attachTo: ed infinite.

space := OBlSpace new.
space root addChild: ed.
space root addChild: vscrollBar.
space extent: 300@900.
space show.
Screen.Recording.2023-06-02.at.16.59.03.mov

Horizontal scroll not working

... or I did something wrong:

largeElement := OBlElement new
	size: 1000 asPoint;
	background: (BlRadialGradientPaint new
		stops: { 0 -> Color green . 1 -> Color red};
		center: 500 asPoint;
		radius: 500;
		yourself);
	yourself.
scrollableElement := largeElement asScrollableElement.

hBar :=
	OBlHorizontalScrollbarElement new
		constraintsDo: [ :c |
			c ignoreByLayout.
			c ignored vertical alignBottom ];
		attachTo: scrollableElement;
		yourself.

scrollPane :=
	BlElement new
		addChild: scrollableElement;
		addChild: hBar;
		constraintsDo: [ :c |
			c horizontal matchParent.
			c vertical matchParent ];
		yourself.

space := OBlSpace new.
space root
	layout: BlLinearLayout new;
	padding: (BlInsets all: 10);
	background: Color blue muchDarker;
	addChild: scrollPane.
space
	extent: 500@500;
	show.

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.