Skip to content

Commit

Permalink
Release v2.4.4.1-m3
Browse files Browse the repository at this point in the history
消除浏览器应用样式表时的抖动
优化主题支持 ( 任务窗口跟随主题、各窗口内分割线跟随主题 )
调整主题样式 ( Solarized 系列调整边框样式,去掉血条阴影)
  • Loading branch information
RadarNyan committed Oct 29, 2016
2 parents 705ce6c + fcad5db commit bebd0da
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 72 deletions.
2 changes: 1 addition & 1 deletion Browser/FormBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ private void Browser_Navigating( object sender, WebBrowserNavigatingEventArgs e

private void Browser_DocumentCompleted( object sender, WebBrowserDocumentCompletedEventArgs e ) {

StyleSheetApplied = false;
ApplyStyleSheet();

ApplyZoom();
Expand Down Expand Up @@ -327,6 +326,7 @@ public void Navigate( string url ) {
/// ブラウザを再読み込みします。
/// </summary>
public void RefreshBrowser() {
StyleSheetApplied = false;
Browser.Refresh( WebBrowserRefreshOption.Completely );
}

Expand Down
46 changes: 6 additions & 40 deletions Browser/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -118,54 +118,20 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="FrameScript" xml:space="preserve">
<value>// KCRDBと競合しないように同じように処理
<value>
try {
var hideStyle = {width:"0px",height:"0px",visibility:"hidden",display:"none"};
var fillStyle = {margin:"0px",padding:"0px",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%",overflow:"hidden"};
var jqBody=document.body;
$(jqBody).css("zoom","normal");
$(jqBody).css({margin:"0px",padding:"0px",overflow:"hidden"});
$("#spacing_top").css(hideStyle);
$("#adFlashWrap").css(fillStyle);
$("#wsFlashWrap").css(fillStyle);
$("#flashWrap").css(fillStyle);
var elmExternalSwf=document.getElementById("externalswf");
if(elmExternalSwf != null) {
elmExternalSwf.setAttribute("width","100%");
elmExternalSwf.setAttribute("height","100%");
}
$("#sectionWrap").css(hideStyle);
$("#globalNavi").css(hideStyle);
$(".rollover").css(hideStyle);
$("img").css(hideStyle);
$(".badge").css(hideStyle);
$("#contentsWrap").css(hideStyle);
$(document.body).css({visibility:"hidden"});
$("#externalswf").css({visibility:"visible",position:"fixed",left:0,top:0});
}
catch(e) {
alert("フレームCSS適用に失敗しました: "+e);
}</value>
</data>
<data name="PageScript" xml:space="preserve">
<value>// KCRDBと競合しないように同じように処理
<value>
try {
var hideStyle = {width:"0px",height:"0px",visibility:"hidden",display:"none"};
var fillStyle = {margin:"0px",padding:"0px",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%",overflow:"hidden"};
$(document.body).css({margin:"0px",padding:"0px",overflow:"hidden"});
$("img").css(hideStyle);
//$("#dmm_ntgnavi").css(hideStyle);
$("#dmm-ntgnavi-renew").css(hideStyle);
$("#w").css(fillStyle);
$("#main-ntg").css(fillStyle);
$("#page").css(fillStyle);
$("#area-game").css(fillStyle);
$("#ntg-recommend").css(hideStyle);
var jqGameFrame=$("#game_frame");
jqGameFrame.css(fillStyle);
jqGameFrame.attr("scrolling","no");
jqGameFrame.attr("width","100%");
jqGameFrame.attr("height","100%");
$("[class^=area-naviapp]").css(hideStyle);
$("#foot").css(hideStyle);
$(document.body).css({visibility:"hidden",overflow:"hidden"});
$("#area-game").css({visibility:"visible",position:"fixed",left:0,top:0});
}
catch(e) {
alert("ページCSS適用に失敗しました: "+e);
Expand Down
49 changes: 49 additions & 0 deletions ElectronicObserver/Utility/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ public Color SubForeColor { get {
case 1: return SolarizedBase0.ColorData;
default: return Color.FromArgb(0x88, 0x88, 0x88);
}}}
public Pen SubBackColorPen { get {
switch (ThemeID) {
case 0: return new Pen(SolarizedBase2.ColorData, 1);
case 1: return new Pen(SolarizedBase02.ColorData, 1);
default: return new Pen(SystemColors.Control, 1);
}}}
public Color Color_Red { get {
switch (ThemeID) {
case 0: return SolarizedRed.ColorData;
Expand Down Expand Up @@ -365,6 +371,49 @@ public Color Fleet_equipmentLevelColor { get {
case 1: return SolarizedCyan.ColorData;
default: return Color.FromArgb(0x00, 0x66, 0x66);
}}}
// 视图 - 任务:任务种类
public Color Quest_Type1Color { get { // 编成
switch (ThemeID) {
case 0: return SolarizedGreen.ColorData;
case 1: return SolarizedGreen.ColorData;
default: return Color.FromArgb(0xAA, 0xFF, 0xAA);
}}}
public Color Quest_Type2Color { get { // 出击
switch (ThemeID) {
case 0: return SolarizedRed.ColorData;
case 1: return SolarizedRed.ColorData;
default: return Color.FromArgb(0xFF, 0xCC, 0xCC);
}}}
public Color Quest_Type3Color { get { // 演习
switch (ThemeID) {
case 0: return SolarizedGreen.ColorData;
case 1: return SolarizedGreen.ColorData;
default: return Color.FromArgb(0xDD, 0xFF, 0xAA);
}}}
public Color Quest_Type4Color { get { // 远征
switch (ThemeID) {
case 0: return SolarizedCyan.ColorData;
case 1: return SolarizedCyan.ColorData;
default: return Color.FromArgb(0xCC, 0xFF, 0xFF);
}}}
public Color Quest_Type5Color { get { // 补给、入渠
switch (ThemeID) {
case 0: return SolarizedYellow.ColorData;
case 1: return SolarizedYellow.ColorData;
default: return Color.FromArgb(0xFF, 0xFF, 0xCC);
}}}
public Color Quest_Type6Color { get { // 工厂
switch (ThemeID) {
case 0: return SolarizedOrange.ColorData;
case 1: return SolarizedOrange.ColorData;
default: return Color.FromArgb(0xDD, 0xCC, 0xBB);
}}}
public Color Quest_Type7Color { get { // 改装
switch (ThemeID) {
case 0: return SolarizedViolet.ColorData;
case 1: return SolarizedViolet.ColorData;
default: return Color.FromArgb(0xDD, 0xCC, 0xFF);
}}}
// 视图 - 罗盘:敌舰名、事件名
public Color Compass_ShipNameColor3 { get { // Flagship
switch (ThemeID) {
Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Utility/SoftwareInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static string VersionEnglish {
/// </summary>
public static DateTime UpdateTime {
get {
return DateTimeHelper.CSVStringToTime( "2016/10/26 17:48:55" );
return DateTimeHelper.CSVStringToTime( "2016/10/29 21:43:26" );
}
}

Expand Down
6 changes: 6 additions & 0 deletions ElectronicObserver/Window/Control/ShipStatusResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ private void ShipStatusResource_Paint( object sender, PaintEventArgs e ) {

const int margin = 3;

if (Utility.Configuration.Config.UI.RemoveBarShadow)
{
BarFuel.Paint( e.Graphics, new Rectangle(0, 5, this.Width, BarFuel.GetPreferredSize().Height));
BarAmmo.Paint( e.Graphics, new Rectangle(0, this.Height - BarFuel.GetPreferredSize().Height - 3, this.Width, BarFuel.GetPreferredSize().Height));
return;
}
BarFuel.Paint( e.Graphics, new Rectangle( 0, margin, this.Width, BarFuel.GetPreferredSize().Height ) );
BarAmmo.Paint( e.Graphics, new Rectangle( 0, this.Height - margin - BarFuel.GetPreferredSize().Height, this.Width, BarFuel.GetPreferredSize().Height ) );

Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Window/FormArsenal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private void MenuMain_ShowShipName_CheckedChanged( object sender, EventArgs e )


private void TableArsenal_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
}


Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Window/FormBaseAirCorps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ private void ContextMenuBaseAirCorps_CopyOrganization_Click( object sender, Even


private void TableMember_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
}

protected override string GetPersistString() {
Expand Down
4 changes: 2 additions & 2 deletions ElectronicObserver/Window/FormBattle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1122,12 +1122,12 @@ void ConfigurationChanged() {

private void TableTop_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
if ( e.Row == 1 || e.Row == 3 )
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
}

private void TableBottom_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
if ( e.Row == 7 )
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
}


Expand Down
11 changes: 6 additions & 5 deletions ElectronicObserver/Window/FormCompass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ protected override string GetPersistString() {
}

private void TableEnemyMember_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
}

private void TableEnemyCandidateMember_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
Expand All @@ -1165,10 +1165,11 @@ private void TableEnemyCandidateMember_CellPaint( object sender, TableLayoutCell
return;


e.Graphics.DrawLine( Pens.Silver, e.CellBounds.Right - 1, e.CellBounds.Top, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );

if ( e.Row == 5 || e.Row == 7 ) {
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
if (e.Column != (Utility.Configuration.Config.FormCompass.CandidateDisplayCount - 1)) {
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.Right - 1, e.CellBounds.Top, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
if (e.Row == 5) e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
} else if (e.Row == 5) {
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 2, e.CellBounds.Bottom - 1);
}
}

Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Window/FormDock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void UpdateTimerTick() {


private void TableDock_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
}


Expand Down
5 changes: 3 additions & 2 deletions ElectronicObserver/Window/FormFleet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,8 @@ public FormFleet( FormMain parent, int fleetID ) {

TableFleet.Visible = false;
TableFleet.SuspendLayout();
TableFleet.BorderStyle = BorderStyle.FixedSingle;
// TableFleet.BorderStyle = BorderStyle.FixedSingle;
TableFleet.BackColor = Utility.Configuration.Config.UI.SubBackColor;
ControlFleet = new TableFleetControl( this, TableFleet );
TableFleet.ResumeLayout();

Expand Down Expand Up @@ -1073,7 +1074,7 @@ private void ContextMenuFleet_FixShipNameWidth_Click( object sender, EventArgs e


private void TableMember_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);
}


Expand Down
2 changes: 1 addition & 1 deletion ElectronicObserver/Window/FormFleetOverview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void UpdateTimerTick() {


private void TableFleet_CellPaint( object sender, TableLayoutCellPaintEventArgs e ) {
e.Graphics.DrawLine( Pens.Silver, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1 );
e.Graphics.DrawLine(Utility.Configuration.Config.UI.SubBackColorPen, e.CellBounds.X, e.CellBounds.Bottom - 1, e.CellBounds.Right - 1, e.CellBounds.Bottom - 1);

}

Expand Down
4 changes: 4 additions & 0 deletions ElectronicObserver/Window/FormMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ private void ConfigurationChanged() {
{
f.BackColor = this.BackColor;
f.ForeColor = this.ForeColor;
if (f is FormShipGroup) { // 暂时不对舰队编成窗口应用主题
f.BackColor = SystemColors.Control;
f.ForeColor = SystemColors.ControlText;
}
}

StripStatus_Information.BackColor = StripStatus_InformationJap2.BackColor = StripStatus_InformationJap3.BackColor = StripStatus_InformationChs1.BackColor = StripStatus_InformationChs2.BackColor = StripStatus_InformationChs3.BackColor = System.Drawing.Color.Transparent;
Expand Down
33 changes: 22 additions & 11 deletions ElectronicObserver/Window/FormQuest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public FormQuest( FormMain parent ) {
CSDefaultLeft = new DataGridViewCellStyle();
CSDefaultLeft.Alignment = DataGridViewContentAlignment.MiddleLeft;
CSDefaultLeft.BackColor =
CSDefaultLeft.SelectionBackColor = SystemColors.Control;
CSDefaultLeft.ForeColor = SystemColors.ControlText;
CSDefaultLeft.SelectionForeColor = SystemColors.ControlText;
CSDefaultLeft.SelectionBackColor = Utility.Configuration.Config.UI.BackColor;
CSDefaultLeft.ForeColor = Utility.Configuration.Config.UI.ForeColor;
CSDefaultLeft.SelectionForeColor = Utility.Configuration.Config.UI.ForeColor;
CSDefaultLeft.WrapMode = DataGridViewTriState.False;

CSDefaultCenter = new DataGridViewCellStyle( CSDefaultLeft );
Expand All @@ -48,34 +48,36 @@ public FormQuest( FormMain parent ) {
CSCategories[i] = new DataGridViewCellStyle( CSDefaultCenter );

Color c;
CSCategories[i].ForeColor = CSCategories[i].SelectionForeColor = Utility.Configuration.Config.UI.Blink_ForeColor;
switch ( i + 1 ) {
case 1: //編成
c = Color.FromArgb( 0xAA, 0xFF, 0xAA );
c = Utility.Configuration.Config.UI.Quest_Type1Color;
break;
case 2: //出撃
c = Color.FromArgb( 0xFF, 0xCC, 0xCC );
c = Utility.Configuration.Config.UI.Quest_Type2Color;
break;
case 3: //演習
c = Color.FromArgb( 0xDD, 0xFF, 0xAA );
c = Utility.Configuration.Config.UI.Quest_Type3Color;
break;
case 4: //遠征
c = Color.FromArgb( 0xCC, 0xFF, 0xFF );
c = Utility.Configuration.Config.UI.Quest_Type4Color;
break;
case 5: //補給/入渠
c = Color.FromArgb( 0xFF, 0xFF, 0xCC );
c = Utility.Configuration.Config.UI.Quest_Type5Color;
break;
case 6: //工廠
c = Color.FromArgb( 0xDD, 0xCC, 0xBB );
c = Utility.Configuration.Config.UI.Quest_Type6Color;
break;
case 7: //改装
c = Color.FromArgb( 0xDD, 0xCC, 0xFF );
c = Utility.Configuration.Config.UI.Quest_Type7Color;
break;
case 8: //出撃(2)
c = Color.FromArgb( 0xFF, 0xCC, 0xCC );
c = Utility.Configuration.Config.UI.Quest_Type2Color;
break;
case 9: //その他
default:
c = CSDefaultCenter.BackColor;
CSCategories[i].ForeColor = CSCategories[i].SelectionForeColor = Utility.Configuration.Config.UI.ForeColor;
break;
}

Expand All @@ -91,6 +93,15 @@ public FormQuest( FormMain parent ) {

#endregion

if (Utility.Configuration.Config.UI.RemoveBarShadow) { // 暂时借用这个属性
QuestView.ColumnHeadersHeight = 21;
QuestView.EnableHeadersVisualStyles = false;
QuestView.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single;
QuestView.ColumnHeadersDefaultCellStyle.ForeColor = Utility.Configuration.Config.UI.ForeColor;
QuestView.ColumnHeadersDefaultCellStyle.BackColor = Utility.Configuration.Config.UI.SubBackColor;
QuestView.GridColor = Utility.Configuration.Config.UI.SubBackColor;
QuestView.BackgroundColor = Utility.Configuration.Config.UI.BackColor;
}

SystemEvents.SystemShuttingDown += SystemEvents_SystemShuttingDown;
}
Expand Down
10 changes: 5 additions & 5 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
2016/10/26 17:48:55
2.4.4.1-m2
微调部分用语、格式
近代化改修结果加入改修后属性数值上限提示 ( 取自魔改版 )
优化主题支持,解决暗色主题部分背景色下文字看不清的问题
2016/10/29 21:43:26
2.4.4.1-m3
消除浏览器应用样式表时的抖动
优化主题支持 ( 任务窗口跟随主题、各窗口内分割线跟随主题 )
调整主题样式 ( Solarized 系列调整边框样式,去掉血条阴影)

对应原版:2.4.4.1
( 2.4.4.1-m1 已合并 )

0 comments on commit bebd0da

Please sign in to comment.