mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlLib: Cocoa partial fix of dark theme
git-svn-id: svn://ultimatepp.org/upp/trunk@12638 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
358ff30e84
commit
dee8441d82
8 changed files with 22 additions and 30 deletions
|
|
@ -18,4 +18,4 @@ public:
|
|||
virtual bool HotKey(dword key);
|
||||
|
||||
void SetMainMenu(Event<Bar&> menu);
|
||||
//$ };
|
||||
//$ };
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
brew install gdb
|
||||
|
||||
|
||||
sooner:
|
||||
|
||||
- Warning: Terminal '/usr/bin/xterm' not found, executing in background.
|
||||
|
||||
|
||||
- drk tyheme
|
||||
|
||||
- .iml D&D does not work
|
||||
|
||||
- Topic++, menu at topics, New topic has wrong hotkey
|
||||
|
|
@ -21,7 +21,6 @@ sooner:
|
|||
|
||||
- download .scd files (or put to bundle)
|
||||
|
||||
|
||||
* apple debugger
|
||||
|
||||
later:
|
||||
|
|
@ -74,6 +73,8 @@ later:
|
|||
done:
|
||||
|
||||
|
||||
- drk tyheme
|
||||
|
||||
- Delete CocoDnD.cpp -> crash
|
||||
|
||||
- tooltip in package organizer is too small
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void CocoButton(Button::Style& s, int type, int value)
|
|||
Image gg = CreateImage(h[i].GetSize(), SColorFace());
|
||||
Over(gg, h[i]);
|
||||
s.monocolor[i] = s.textcolor[i] = i == CTRL_DISABLED ? SColorDisabled()
|
||||
: Grayscale(AvgColor(gg, h[i].GetSize().cy / 3)) > 160 ? SColorText()
|
||||
: Grayscale(AvgColor(gg, h[i].GetSize().cy / 3)) > 160 ? Black()
|
||||
: White();
|
||||
}
|
||||
s.overpaint = 5;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ void Coco_ThemePaint(void *cgcontext, const Upp::Rect& r, int type, int value, i
|
|||
memset(&bdi, 0, sizeof(bdi));
|
||||
bdi.value = Upp::decode(value, 0, kThemeButtonOff, 1, kThemeButtonOn, kThemeButtonMixed);
|
||||
bdi.state = st;
|
||||
bdi.kind = Upp::decode(type, COCO_CHECKBOX, (int)kThemeCheckBox,
|
||||
bdi.kind = Upp::decode(type, COCO_CHECKBOX, (int)kThemeSmallCheckBox,
|
||||
COCO_RADIOBUTTON, (int)kThemeSmallRadioButton,
|
||||
COCO_BEVELBUTTON, (int)kThemeBevelButtonMedium,
|
||||
COCO_ROUNDEDBUTTON, (int)kThemeRoundedBevelButton,
|
||||
|
|
|
|||
|
|
@ -124,11 +124,7 @@ int CharFilterReSlash(int c)
|
|||
|
||||
String Bpoint(Host& host, const String& file, int line)
|
||||
{
|
||||
#ifdef PLATFORM_COCOA
|
||||
return String() << " -l " << line + " -f " << Filter(host.GetHostPath(NormalizePath(file)), CharFilterReSlash);
|
||||
#else
|
||||
return String().Cat() << Filter(host.GetHostPath(NormalizePath(file)), CharFilterReSlash) << ":" << line + 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool Gdb::TryBreak(const char *text)
|
||||
|
|
@ -149,21 +145,12 @@ bool Gdb::SetBreakpoint(const String& filename, int line, const String& bp)
|
|||
String bi = Bpoint(*host, filename, line);
|
||||
|
||||
String command;
|
||||
#ifdef PLATFORM_COCOA
|
||||
if(bp.IsEmpty())
|
||||
command = "breakpoint clear " + bi;
|
||||
else if(bp[0]==0xe || bp == "1")
|
||||
command = "breakpoint set " + bi;
|
||||
else
|
||||
command = "breakpoint set " + bi + " if " + bp;
|
||||
#else
|
||||
if(bp.IsEmpty())
|
||||
command = "clear " + bi;
|
||||
else if(bp[0]==0xe || bp == "1")
|
||||
command = "b " + bi;
|
||||
else
|
||||
command = "b " + bi + " if " + bp;
|
||||
#endif
|
||||
return !FastCmd(command).IsEmpty();
|
||||
}
|
||||
|
||||
|
|
@ -548,9 +535,6 @@ bool Gdb::Create(One<Host>&& _host, const String& exefile, const String& cmdline
|
|||
watches.WhenAcceptEdit = THISBACK(ObtainData);
|
||||
tab <<= THISBACK(ObtainData);
|
||||
|
||||
#ifdef PLATFORM_COCOA
|
||||
Cmd("settings set prompt " GDB_PROMPT);
|
||||
#else
|
||||
Cmd("set prompt " GDB_PROMPT);
|
||||
Cmd("set disassembly-flavor intel");
|
||||
Cmd("set exec-done-display off");
|
||||
|
|
@ -563,7 +547,6 @@ bool Gdb::Create(One<Host>&& _host, const String& exefile, const String& cmdline
|
|||
Cmd("set print vtbl off");
|
||||
Cmd("set print repeat 0");
|
||||
Cmd("set print null-stop");
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WIN32
|
||||
Cmd("set new-console on");
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public:
|
|||
void Lock();
|
||||
void Unlock();
|
||||
|
||||
String Cmd(const char *command);
|
||||
String Cmd(const char *command, bool start = false);
|
||||
String FastCmd(const char *command);
|
||||
|
||||
bool IsProcessExitedNormally(const String& cmd_output) const;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ bool Gdb::Result(String& result, const String& s)
|
|||
return false;
|
||||
}
|
||||
|
||||
String Gdb::Cmd(const char *command)
|
||||
String Gdb::Cmd(const char *command, bool start)
|
||||
{
|
||||
if(!dbg || !dbg->IsRunning() || IdeIsDebugLock()) return Null;
|
||||
#ifdef _DEBUG
|
||||
|
|
@ -125,10 +125,16 @@ String Gdb::Cmd(const char *command)
|
|||
LLOG("Running: " << dbg->IsRunning());
|
||||
break;
|
||||
}
|
||||
if(s.GetCount()) DDUMP(s);
|
||||
if(!s.IsEmpty() && Result(result, s)) {
|
||||
LLOG(result);
|
||||
PutVerbose(result);
|
||||
break;
|
||||
if(start) {
|
||||
start = false;
|
||||
result = s.Mid(result.GetCount());
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
if(ms0 != msecs()) {
|
||||
ProcessEvents();
|
||||
|
|
@ -144,7 +150,9 @@ String Gdb::Cmd(const char *command)
|
|||
if(command) {
|
||||
PutVerbose(String() << "Time of `" << command <<"` " << ts);
|
||||
}
|
||||
PutVerbose("Result: " + result);
|
||||
PutVerbose("=========== Result:");
|
||||
PutVerbose(result);
|
||||
PutVerbose("===================");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,16 +87,16 @@ bool TTYQuit() { return false; }
|
|||
String GdbCommand(bool console)
|
||||
{
|
||||
#ifdef PLATFORM_COCOA
|
||||
String gdb = "lldb ";
|
||||
String gdb = "/usr/local/bin/gdb ";
|
||||
#else
|
||||
String gdb = "gdb ";
|
||||
#endif
|
||||
#ifdef PLATFORM_POSIX
|
||||
if(console) {
|
||||
String tty = CreateDebugTTY();
|
||||
if(tty.GetCount())
|
||||
gdb << "-tty=" << tty << ' ';
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return gdb;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue