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:
parent
e6ae8c76ed
commit
360e569a2c
@ -487,7 +487,7 @@ CannaLooper::HandleMethodActivated( bool active )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ForceKakutei();
|
ForceKakutei();
|
||||||
uint32 result = canna->ChangeMode( CANNA_MODE_HenkanMode );
|
canna->ChangeMode( CANNA_MODE_HenkanMode );
|
||||||
BMessage m( PALETTE_WINDOW_BUTTON_UPDATE );
|
BMessage m( PALETTE_WINDOW_BUTTON_UPDATE );
|
||||||
m.AddInt32( "mode", CANNA_MODE_HenkanMode );
|
m.AddInt32( "mode", CANNA_MODE_HenkanMode );
|
||||||
thePalette->PostMessage( &m );
|
thePalette->PostMessage( &m );
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
KouhoWindow::KouhoWindow( BFont *font, BLooper *looper )
|
KouhoWindow::KouhoWindow( BFont *font, BLooper *looper )
|
||||||
:BWindow( DUMMY_RECT,
|
:BWindow( DUMMY_RECT,
|
||||||
"kouho", kLeftTitledWindowLook,
|
"kouho", B_MODAL_WINDOW_LOOK,
|
||||||
B_FLOATING_ALL_WINDOW_FEEL,
|
B_FLOATING_ALL_WINDOW_FEEL,
|
||||||
B_NOT_RESIZABLE | B_NOT_CLOSABLE |
|
B_NOT_RESIZABLE | B_NOT_CLOSABLE |
|
||||||
B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_AVOID_FOCUS |
|
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:
|
case KOUHO_WINDOW_SETTEXT:
|
||||||
const char* newtext;
|
const char* newtext;
|
||||||
bool hideindex, limitsize, partialhighlight;
|
bool hideindex, limitsize;
|
||||||
msg->FindString( "text", &newtext );
|
msg->FindString( "text", &newtext );
|
||||||
kouhoView->SetText( newtext );
|
kouhoView->SetText( newtext );
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ void KouhoView::HighlightLine( int32 line )
|
|||||||
if ( line != -1 )
|
if ( line != -1 )
|
||||||
{
|
{
|
||||||
begin = OffsetAt( line );
|
begin = OffsetAt( line );
|
||||||
if ( line == CountLines() )
|
if ( line == CountLines() - 1 )
|
||||||
end = TextLength() + 1;
|
end = TextLength() + 1;
|
||||||
else
|
else
|
||||||
end = OffsetAt( line + 1 ) - 1;
|
end = OffsetAt( line + 1 ) - 1;
|
||||||
@ -289,17 +289,16 @@ KouhoView::HighlightPartial( int32 begin, int32 end )
|
|||||||
|
|
||||||
void KouhoView::Draw( BRect rect )
|
void KouhoView::Draw( BRect rect )
|
||||||
{
|
{
|
||||||
|
BTextView::Draw( rect );
|
||||||
rgb_color viewcolor = ViewColor();
|
rgb_color viewcolor = ViewColor();
|
||||||
SetHighColor( selection_color );
|
SetHighColor( selection_color );
|
||||||
SetDrawingMode( B_OP_MIN );
|
SetDrawingMode( B_OP_MIN );
|
||||||
FillRect( highlightRect );
|
FillRect( highlightRect );
|
||||||
BTextView::Draw( rect );
|
|
||||||
// SetViewColor( viewcolor );
|
// SetViewColor( viewcolor );
|
||||||
}
|
}
|
||||||
|
|
||||||
void KouhoView::MouseDown( BPoint point )
|
void KouhoView::MouseDown( BPoint point )
|
||||||
{
|
{
|
||||||
BWindow *win;
|
|
||||||
KouhoIndexView *iview;
|
KouhoIndexView *iview;
|
||||||
iview = (KouhoIndexView *)(Window()->FindView( "index" ));
|
iview = (KouhoIndexView *)(Window()->FindView( "index" ));
|
||||||
if ( iview->IsNumberDisplayHidden() )
|
if ( iview->IsNumberDisplayHidden() )
|
||||||
|
@ -14,8 +14,10 @@
|
|||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
|
|
||||||
|
#include "WindowPrivate.h"
|
||||||
|
|
||||||
PaletteWindow::PaletteWindow( BRect rect, BLooper *looper )
|
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_FLOATING_ALL_WINDOW_FEEL,
|
||||||
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_NOT_CLOSABLE |
|
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_NOT_CLOSABLE |
|
||||||
B_AVOID_FOCUS | B_WILL_ACCEPT_FIRST_CLICK )
|
B_AVOID_FOCUS | B_WILL_ACCEPT_FIRST_CLICK )
|
||||||
|
Loading…
Reference in New Issue
Block a user