Patch from Momoziro.

Fixes highlighting bug in CannaIM's Kouhou window.
Changes windows look to better values


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17722 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2006-06-04 19:46:07 +00:00
parent e6ae8c76ed
commit 360e569a2c
3 changed files with 8 additions and 7 deletions

View File

@ -487,7 +487,7 @@ CannaLooper::HandleMethodActivated( bool active )
else
{
ForceKakutei();
uint32 result = canna->ChangeMode( CANNA_MODE_HenkanMode );
canna->ChangeMode( CANNA_MODE_HenkanMode );
BMessage m( PALETTE_WINDOW_BUTTON_UPDATE );
m.AddInt32( "mode", CANNA_MODE_HenkanMode );
thePalette->PostMessage( &m );

View File

@ -19,7 +19,7 @@
KouhoWindow::KouhoWindow( BFont *font, BLooper *looper )
:BWindow( DUMMY_RECT,
"kouho", kLeftTitledWindowLook,
"kouho", B_MODAL_WINDOW_LOOK,
B_FLOATING_ALL_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_CLOSABLE |
B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AVOID_FOCUS |
@ -132,7 +132,7 @@ SERIAL_PRINT(( "kouhoWindow: KOUHO_WINDOW_SHOWAT recieved.\n" ));
case KOUHO_WINDOW_SETTEXT:
const char* newtext;
bool hideindex, limitsize, partialhighlight;
bool hideindex, limitsize;
msg->FindString( "text", &newtext );
kouhoView->SetText( newtext );
@ -262,7 +262,7 @@ void KouhoView::HighlightLine( int32 line )
if ( line != -1 )
{
begin = OffsetAt( line );
if ( line == CountLines() )
if ( line == CountLines() - 1 )
end = TextLength() + 1;
else
end = OffsetAt( line + 1 ) - 1;
@ -289,17 +289,16 @@ KouhoView::HighlightPartial( int32 begin, int32 end )
void KouhoView::Draw( BRect rect )
{
BTextView::Draw( rect );
rgb_color viewcolor = ViewColor();
SetHighColor( selection_color );
SetDrawingMode( B_OP_MIN );
FillRect( highlightRect );
BTextView::Draw( rect );
// SetViewColor( viewcolor );
}
void KouhoView::MouseDown( BPoint point )
{
BWindow *win;
KouhoIndexView *iview;
iview = (KouhoIndexView *)(Window()->FindView( "index" ));
if ( iview->IsNumberDisplayHidden() )

View File

@ -14,8 +14,10 @@
#include <Bitmap.h>
#include <Screen.h>
#include "WindowPrivate.h"
PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
:BWindow( rect, B_EMPTY_STRING, (window_look) 25 /*B_FLOATING_WINDOW_LOOK*/,
:BWindow( rect, B_EMPTY_STRING, kLeftTitledWindowLook,
B_FLOATING_ALL_WINDOW_FEEL,
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_NOT_CLOSABLE |
B_AVOID_FOCUS | B_WILL_ACCEPT_FIRST_CLICK )