Page 2 of 2

Re: Should we remove underlines for all links?

Posted: Tue Feb 16, 2016 9:26 am
by Josef Templ
All these examples underline a link when the mouse is moved over it.
Without this effect the new links would still not be state-of-the-art
and neither following the old convention nor the new.

- Josef

Re: Should we remove underlines for all links?

Posted: Tue Feb 16, 2016 12:31 pm
by Robert
I voted no.

If someone came up with a simple and efficient implementation that underlines links actively when the mouse is on them I would consider changing my mind.

Robert

Re: Should we remove underlines for all links?

Posted: Tue Feb 16, 2016 3:54 pm
by Josef Templ
Robert wrote:I voted no.

If someone came up with a simple and efficient implementation that underlines links actively when the mouse is on them I would consider changing my mind.

Robert

Me too.

- Josef

Re: Should we remove underlines for all links?

Posted: Tue Feb 16, 2016 7:09 pm
by Ivan Denisov
I have finished the demo of this feature:
http://blackboxframework.org/unstable/i ... a1.433.zip

Please, check the Help dialog (F1). I removed underlines from it.

I really like how it looks.

The way I did this
http://redmine.blackboxframework.org/pr ... a68f8cb0bb

Re: Should we remove underlines for all links?

Posted: Wed Feb 17, 2016 8:43 am
by Josef Templ
Excellent!

- Josef

Re: Should we remove underlines for all links?

Posted: Wed Feb 17, 2016 9:41 pm
by Robert
Works nicely.

I assume the implementation can be described as "Simple & efficient & reliable".

I have changed my vote to yes.

Re: Should we remove underlines for all links?

Posted: Thu Feb 18, 2016 2:10 am
by Ivan Denisov
There are some problems, so this is not final solution.
1. Focus edit field blinking
2. Sometimes controls lost focus (i assume) and clicking from second attempt

Re: Should we remove underlines for all links?

Posted: Sat Feb 20, 2016 10:27 am
by luowy
I'm just show the link cmd on the status bar,
without touch the underline attributes,it is too heavy work to do for me.


StdLinks

Code: Select all

VAR cmdString:POINTER TO ARRAY OF CHAR;
StdLinks.HandleCtrlMsg

Code: Select all

	BEGIN(*HandleCtrlMsg*)
		WITH msg: Controllers.PollCursorMsg DO
			msg.cursor := Ports.refCursor;
		| msg: TextControllers.FilterPollCursorMsg DO
			IF isHot(msg.controller, msg.x, msg.y, {}) THEN
				msg.cursor := Ports.refCursor; msg.done := TRUE;
				(*>>*)
				IF (v.leftSide)&(v.cmd # cmdString) THEN  
					Dialog.ShowStatus(v.cmd);cmdString:=v.cmd; 
				END;
			ELSE 
				IF cmdString # NIL THEN 
					Dialog.ShowStatus("");cmdString:=NIL;
				END;  
				(*>>*)
			END
		| msg: Controllers.TrackMsg DO
			Track(v, f, NIL, msg.x, msg.y, msg.modifiers)
		| msg: TextControllers.FilterTrackMsg DO
			IF isHot(msg.controller, msg.x, msg.y, msg.modifiers) THEN
				Track(v, f,  msg.controller, msg.x, msg.y, msg.modifiers);
				msg.done := TRUE
			END
		ELSE
		END
	END HandleCtrlMsg;
TextControllers.FindFilter

Code: Select all

	PROCEDURE FindFilter  (c: StdCtrl; f: Views.Frame; x, y: INTEGER; OUT filter : Views.View);
		CONST catchRange = 1000;
		VAR rd: TextModels.Reader; pos, beg, end: INTEGER; isF: BOOLEAN;
	BEGIN
		c.view.GetRange(f, beg, end); DEC(beg, catchRange);
		pos := c.view.ThisPos(f, x, y);
		IF pos < c.text.Length() THEN INC(pos) END;	(* let filter handle itself *)
		rd := CachedReader(c); rd.SetPos(pos);
		REPEAT
			rd.ReadPrevView(filter);
			isF := (filter # NIL) & IsFilterView(filter, c, f, x, y);
		UNTIL isF OR rd.eot OR (rd.Pos() < beg);
		IF ~isF THEN filter := NIL END;
		(*<<*)
		IF filter=NIL THEN (*right*)
			rd.SetPos(pos);
			REPEAT
				rd.ReadView(filter);
				isF := (filter # NIL) & IsFilter (filter, c, f, x, y);
			UNTIL isF OR rd.eot OR (rd.Pos() >=end );
		END;
		(*>>*)
		CacheReader(c, rd)
	END FindFilter ;

Re: Should we remove underlines for all links?

Posted: Mon Feb 22, 2016 11:07 am
by Zinn
I try the underline sample and the status line sample together and my conclusion is:
It looks much better when I use the status line sample only by its own.
We needn't to underline the link during pointing on it.
The cursor change from the caret to the hand and that is really enough.
- Helmut